M5 - 3 - Swing Packages, Event Handling in Swings.
M5 - 3 - Swing Packages, Event Handling in Swings.
Java
Module 5 - Graphical User Interface and
Database support of Java
(Part 3)
Prepared by
Renetha J.B.
AP
Dept.of CSE,
Lourdes Matha College of Science and Technology
Swings
Swing Packages
javax.swing.tree javax.swing.undo
1. desktop application.
2. applet
• The next line of code adds the label to the content pane of the
frame:
jfrm.add(jlab);
Container getContentPane( )
jfrm.setVisible(true);
• Swing uses the same events as does the AWT, and these events
are packaged in java.awt.event.
RUN
appletviewer MySwingApplet.java