O'Reilly logo

JAVA Programming by K. Rajkumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 15

Graphics Programming

OBJECTIVES
  • To explain class hierarchy of swing components and containers
  • To introduce three containers: JFrame, JPanel and JApplet
  • To draw geometric shapes such as lines, arcs, ovals, rectangles, polygons and polylines using methods from Graphics class
  • To generate random multilines
  • To draw random rectangles
  • To load images using Toolkit and ImageIcon and display them
  • To design multithreaded blinking balls
  • To paint random circles using JApplet
  • To use Graphics2D class methods for painting geometric shapes such as lines, curves, rectangles, ellipses and arcs
  • To introduce Colors, GradientPaint and TexturePaint classes
  • To draw arbitrary shapes using GeneralPath class
  • To apply translation, rotation, scaling and

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required