EN 605.482 GUI Development with the Java Foundation Classes
Homework 1
In this homework, you will become
familiar with JFrames, JInternalFrames, and layout managers..
The requirements for this assignment are as follows.
Step 1: Use a JOptionPane to get a main window size from the user. The choices should be 400x400, 800x800, 1000x1000 pixels.
Step 2: Once the user has selected the size, create a single window (JFrame) that is the chosen size. It should contain a single JDesktopPane that takes up its internal space. Closing the window shall exit the program.
The JDesktopPane will implement some type of simple window management scheme other than the default behavior of placing all windows at (0,0). In addition, this object shall manage the placement of the iconified JInternalFrame icons so that they will always be visible and organized in the JDesktopPane. You shall create a class that inherits from JDesktopPane that will manage your windows. This class shall be documented properly so that it can be used by other people at a later time.
The desktop pane will contain four JInternalFrame windows. Each internal frame shall be 400x200 pixels in size, and shall be resizable, iconifiable, minizable and closable. Closing an internal frame will not exit the program. Each of the internal frames will contain different layouts, and have for its title the name of the layout it is "showcasing". The layouts shall be as follows:
Grading Criteria is as follows:
| Item |
Points |
|---|---|
| Program Runs w/ no exceptions | 15 |
| Correct Layout of Panels | 20 |
| JOptionPane usage | 20 |
| JDesktop Pane layout | 20 |
| JInternalFrame and JFrame behavior | 10 |
| Cover Page Complete | 5 |
| Neatness/Presentation | 5 |
| Extra Effort | 5 |