home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-03-13 | 714 b | 36 lines |
- import java.awt.*;
- import java.applet.*;
-
- public class ConfigApplet2 extends Applet
- {
- String str;
- Point position;
-
- public void init()
- {
- String s;
-
- str = getParameter("text");
-
- s = getParameter("typesize");
- int typeSize = Integer.parseInt(s);
-
- s = getParameter("xpos");
- int xpos = Integer.parseInt(s);
-
- s = getParameter("ypos");
- int ypos = Integer.parseInt(s);
-
- position = new Point(xpos, ypos);
-
- Font font = new Font("TimesRoman", Font.BOLD, typeSize);
- setFont(font);
- }
-
- public void paint(Graphics g)
- {
- g.drawString(str, position.x, position.y);
- }
- }
-
-