![]() |
![]() |
![]() |
![]() |
Code Generation
Each of the five graphical Composers (Main, Frame, Dialog, Window, Panel) generate code based on the AWT architecture by default. They each have a checkbox on their properties page labeled 'Generate Swing code' which changes the generated code to the JFC/Swing architecture.
Specifically, selecting the 'Generate Swing code' checkbox converts all Frame, Dialog, Window, and Panel classes to JFrame, JDialog, and JPanel classes. All of the Menu-related classes are also generated to correspond to their appropriate parent Frame or JFrame.
The three Composers which include title bars (Main, Frame, and Dialog) have an additional option called 'default close action'. This choice, available only when Swing code generation is enabled, is a shorthand to specify what should happen when the user attempts to close a Frame or Dialog. The most common actions (hide or dispose) can be chosen. Using these options can replace the need to listen for window events in many cases.
The Main Application Composer has an addition set of three radio buttons. These buttons indicate what kind of Java program should be created. Choose 'Application' to create a stand-alone Java application. Choose 'Applet' to create a Java program that can be embedded in a web page. Choose 'Both' to create a Java program that can run stand-alone or be embedded in a web page.
Data Representations, Inc. http://www.datarepresentations.com support@datarepresentations.com sales@datarepresentations.com |
![]() |
![]() |
![]() |
![]() |