15-12-2012, 01:57 PM
Graphical User Interface(GUI) IN JAVA
1Graphical User.pdf (Size: 221.79 KB / Downloads: 32)
AWT
The Abstract Window Toolkit (AWT) is Java's original platform-independent windowing, graphics, and
user-interface widget toolkit. The AWT is now part of the Java Foundation Classes (JFC) — the standard
API for providing a graphical user interface (GUI) for a Java program.
AWT contains classes for implementing Color, Graphics, Button, Canvas, Frame, Panel, Window
,BorderLayout, FlowLayout etc
Swing
Swing was developed to provide a more sophisticated set of GUI components than the Abstract Window
Toolkit. Swing provides a native look and feel that emulates the look and feel of several platforms, and also
supports a pluggable look and feel that allows applications to have a look and feel unrelated to the
underlying platform. It has more powerful and flexible components than AWT.
Activity 5 Draw a circle Icon of radius 50 at the center of JFrame
Hint:- In order to add circle to JFrame, we have to add through JLabel class since JLabel constructor
supports that. First write a circleicon class which implements Icon interface. In driver class, create an object
of circleicon class and create a Jlabel.