SHARE
TWEET

APCS_SHORTS_Hello4.java

calcpage Oct 4th, 2013 34 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. Hello4.java     MrG     2013.0927
  3. purpose:        experimenting with applets
  4. required files: Hello4.java             main class
  5.                 Hello4.html             website
  6. translator:     javac Hello4.java
  7. interpreter:    appletviewer Hello4.html
  8. */
  9.  
  10. //imported classes
  11. import javax.swing.JApplet;
  12. import java.awt.Graphics;
  13. import java.awt.Graphics2D;
  14.  
  15. //applet class
  16. public class Hello4 extends JApplet
  17. {
  18.         public void paint(Graphics g)
  19.         {
  20.                 Graphics2D g2 = (Graphics2D) g;
  21.                 g2.drawString("Hello, Dave!!!", 50, 100);
  22.         }
  23. }
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top