Thu Feb 07, 2013 8:55 pm
import java.awt.*;
import java.applet.Applet;
/*
* Very simple applet that illustrates parameters to text-drawing methods.
*/
public class TextXY extends Applet {
public void init() {
validate();
}
public void paint(Graphics g) {
Dimension d = size();
g.drawString("My Text at (4, 6)", 4, 6);
g.drawString("My Text at (3, 31)", 3, 31);
g.drawString("My Text at (3, height)", 3, d.height);
}
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.