Advertisement
konlawat007

BEAR Graphic

Aug 28th, 2014
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.85 KB | None | 0 0
  1.       public static void main(String[] args) {
  2.             JFrame frame = new JFrame() {
  3.                 public void paint(Graphics g) {
  4.                     //HEAD
  5.                     g.drawOval(100, 70, 90, 90);
  6.                     //EARS
  7.                     g.drawOval(100, 70, 20, 20);
  8.                     g.drawOval(170, 70, 20, 20);
  9.                     //EYES
  10.                     g.drawOval(120, 100, 15, 15);
  11.                     g.drawOval(122, 101, 10, 10);
  12.                     g.drawOval(150, 100, 15, 15);
  13.                     g.drawOval(152, 101, 10, 10);
  14.                     //NOSE
  15.                     g.drawOval(120, 120, 50, 40);
  16.                     g.drawOval(129, 120, 30, 15);                
  17.                 }
  18.             };
  19.              
  20.             frame.setSize(300, 300);
  21.             frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
  22.             frame.setVisible(true);
  23.  
  24.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement