Main Page

Previous Next


  1. Create an application, with a square window in the center of the screen that is half the height of the screen by deriving your own window class from JFrame.

  2. Add six buttons to the application in the previous example in a vertical column on the left side of the application window.

  3. Add a menu bar containing the items File, Edit, Window, and Help.

  4. Add a pull-down menu for Edit containing the two groups of items of your own choice with a separator between them.

  5. Add another item to the Edit pull-down menu which itself has a pull-down menu, and provide accelerators for the items in the menu.

  6. Here's an exercise to tickle the brain cells – use a SpringLayout to obtain the button arrangement shown below in an application window.

    Click To expand
Previous Next
JavaScript Editor Java Tutorials Free JavaScript Editor