<<< A5 Setting the Window Close Box, Cont. | Index | A6 Making a Reusable ApplicationFrame Class, cont. >>> |
The next step is to make the functionality of the JFrame reusable.
This can be done by extending the JFrame and adding appropriate initialization.
The following sample code demonstrates FrameApplication class added to application package, and Javadoc comments.
Swing demo A6 makes FrameApplication reusable:
Class SwingMain: SwingMain.java (download)
Class FrameApplication extends javax.swing.JFrame:
FrameApplication.java
(download)
<<< A5 Setting the Window Close Box, Cont. | Index | A6 Making a Reusable ApplicationFrame Class, cont. >>> |