Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 20-09-2004, 10:41 PM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Mar 2004
Location: hyderabad
Posts: 25
Default Java Programmers, help!!!!


guyz,
can someone please tellme how to print this on screen using java applets???


*
* *
* * *
* * * *
* * * * *

i didnt gettit tho i tried
__________________
Only one thing is certain -- that is, nothing is certain. If this statement is true, it is also false
---ANIRUDH
cockyrudh_2020 is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 20-09-2004, 10:46 PM   #2 (permalink)
In The Zone
 
Join Date: May 2004
Location: dehradun
Posts: 389
Default

hey firstly it should be in Q&A
but for ur ans
use {for} loop for this
just use println("*") & then (" ")
and if u want program
PM me
__________________
Music is like Sex, The more you get, the more you want.
demoninside is offline  
Old 21-09-2004, 12:38 AM   #3 (permalink)
In The Zone
 
#/bin/sh's Avatar
 
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
Default

Classwork?
__________________
\"99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again, 148 little bugs in the code. 148 little bugs in the code....\"
#/bin/sh is offline  
Old 21-09-2004, 01:06 AM   #4 (permalink)
In The Zone
 
#/bin/sh's Avatar
 
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
Default

import java.awt.Color;
import java.awt.Container;
import java.awt.Graphics;

import javax.swing.JApplet;

/**
* @author #/bin/sh

*/
public class StarApplet extends JApplet
{
public void init()
{
Container content = getContentPane();
content.setBackground(Color.white);
}
public void paint(Graphics g)
{
String stars[] = {"*", "**", "***", "****", "*****"};
for(int i=0; i<5; i++)
g.drawString(stars[i], 50, 50+(i*10));
}
}
__________________
\"99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again, 148 little bugs in the code. 148 little bugs in the code....\"
#/bin/sh is offline  
Old 21-09-2004, 05:15 AM   #5 (permalink)
In The Zone
 
Join Date: May 2004
Location: dehradun
Posts: 389
Default

oops din't read USING APPLET so told u in application consol m8!
__________________
Music is like Sex, The more you get, the more you want.
demoninside is offline  
Old 21-09-2004, 06:35 AM   #6 (permalink)
Right Off the Assembly Line
 
Join Date: Mar 2004
Location: hyderabad
Posts: 25
Default

thanx ppl
__________________
Only one thing is certain -- that is, nothing is certain. If this statement is true, it is also false
---ANIRUDH
cockyrudh_2020 is offline  
Old 21-09-2004, 11:04 AM   #7 (permalink)
Right Off the Assembly Line
 
Join Date: Sep 2004
Location: Ahmedabad
Posts: 7
Default Re: Java Programmers, help!!!!

Quote:
Originally Posted by cockyrudh_2020
guyz,
can someone please tellme how to print this on screen using java applets???


*
* *
* * *
* * * *
* * * * *

i didnt gettit tho i tried
Man!!!!!!!

This simple program!!!! First think on problem.
U need to put '*' then '**', so....................
need two loops.................
one for File lines.................
second for columns............... iterate this for one more time than current line index.

OK...........
Be happy.................

Expecting a single click on ads of my website........... to make my earninngs.............
__________________
[color=red]Ankit Jain[/color]
अंकित जैन
(AnkitAsDeveloper)
\"Developers have their own GODS\"
ankitjain is offline  
Old 21-09-2004, 06:43 PM   #8 (permalink)
Right Off the Assembly Line
 
Join Date: Mar 2004
Location: hyderabad
Posts: 25
Default

yaar i knew the code for a normal java progy, what i wanted was for an applet code..... which "bin" gave me, thanx m8
__________________
Only one thing is certain -- that is, nothing is certain. If this statement is true, it is also false
---ANIRUDH
cockyrudh_2020 is offline  
Old 22-09-2004, 12:30 AM   #9 (permalink)
In The Zone
 
#/bin/sh's Avatar
 
Join Date: Apr 2004
Location: 42.65 N 73.76 W
Posts: 213
Default

no problem, welcome.
__________________
\"99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again, 148 little bugs in the code. 148 little bugs in the code....\"
#/bin/sh is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by abhidev
- by Sujeet
- by Sarath
- by Krow

Advertisement




All times are GMT +5.5. The time now is 08:38 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2