How to create a JFrame

HintMake sure the Project where you wish to store the JFrame is selected in the Navigation Tree.

New JFrame

Now you can press the New JFrame button on the toolbar.

A new JFrame editor is opened ...

JFrame Editor
  • Activate the Title check box and set this property to Howto Examples.
  • Activate the Close Op. check box and set this property to Exit.
  • Activate the Bounds check box and press the Check button to see how this frame appears on the screen.
  • Change some properties, press Check again, and see what effects your changes have.
  • Activate the Frame Icon check box and press the button on the very right of this property. After this a resource editor appears. Within this editor activate the Classpath radio button and select the SpeedJG.jar from the combo box beneath. Navigate to the /images/hew/JGLogo18.gif and leave this dialog with OK.
  • Press the Check button within the JFrame editor again and you will see the frame with the selected icon as frame icon.
  • Press the Source button to see the source code for this frame.
    Source Popup Menu Activate the popup menu on the source code panel and select Source Code File to store the Java code. Compile and run the program. As you will see, the result is the same as when pressing the Check button.
  • If you are content with your frame press Save to store the JFrame meta data into the tree sructure and Exit this editor.