aspose file tools*
The moose likes Beginning Java and the fly likes g.drawString() doesn't paint the text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "g.drawString() doesn Watch "g.drawString() doesn New topic
Author

g.drawString() doesn't paint the text

Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
import java.awt.*;
import java.applet.Applet;
public class MyFirstApplet extends Applet {
public void pain(Graphics g) {
g.drawString("Hello",20,50);
}

}
// <applet code="MyFirstApplet" height=500 width=200> </applet>
Hello;
The problem I am having is, when I run the program using the appletviewer,
"Hello" doesn't get painted.
Why is this?


SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
Hello,
I am so sorry, I have misspelt the paint method.
I have written it as pain().
Sorry about it.
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: g.drawString() doesn't paint the text