permaculture playing cards*
The moose likes Java in General and the fly likes JAVA architecture Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "JAVA architecture " Watch "JAVA architecture " New topic
Author

JAVA architecture

rexjonathan
Greenhorn

Joined: Jan 27, 2001
Posts: 12

Dear friend,
I am asking you to some basic JAVA architecture qustion
The question is ,
I am designing an applet ,where i want to display an message in applet say �hello� ,so i use Graphics class to display the string ,the code is
Line1:Graphics g=getGraphics();
Line2:g.drawString(�hello�,10,10);
Or
Public void paint(Graphics g)
{
g.drawString(�hello�,10,10);
}
my question is-�how it is possible without creating instance of Graphics class to call a method drawString() ,people say that the reference to the Graphics class is produced if it�s true please explain me how the refrence is passed and how it is working�
rex

Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Please don't post the same question to more than one forum. You obviously read more than one forum, and so do people who might know the answer to your question. All answers to the one in "Java in General, (beginner)" please.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAVA architecture