Advertisement
tcl1

[JAVA] Drawing in a applet

Oct 31st, 2013
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. package whatever; //Package name replaces "whatever"
  2.  
  3. import java.applet.Applet;
  4. import java.awt.*;
  5.  
  6. public class myclass extends Applet { //Class name replaces "myclass"
  7.     public void paint(Graphics g) {
  8.         g.setColor(Color.RED); //Can change the color
  9.         g.drawRect(10, 20, 30, 40); //Can be adjusted
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement