Graphics is a way to represent visual element in application. Java provided us rich set of methods and class through Java2D API to deal with the graphics in java platform and application. Using AWT methods to draw and manipulated GUI interface. Java2D comes with rich set of function to manipulate images, text, font, color, etc. It has capability to draw basic geometric shapes and curves. Java media framework allows us to work with media files and create animations. Java media framework depends upon Java2D framework for rendering purposes. For basic drawing operation every java AWT component which is visible to screen contains a reference to graphics object, which is an object of abstract class Graphics. It comes with many useful methods to draw elements like rectangle, ellipses and lines on AWT components. To use this method we just need to override paint() method of AWT component. In this example we are going to
Very precise but on the point
ReplyDelete