CST2641 Advanced
Java I
Lab Week 4
Exercises |
Exercise 7.1 For this exercise use a previous applet that you wrote in Intro to Java that drew geometric shapes. Ideal programs would come from chapters 3, 4, and 5 in Java for Students. Convert your applet to an application. Use swing. Your frame should use 1/4 of the screen size, regardless of the resolution of the screen. Verify this by setting the resolution of your screen to 640X480, 800X600, and 1024X768 and checking that your application uses only 1/4 of the screen. The frame should be approximately in the center of the monitor screen. Give the window an appropriate title that represents what your program does. Display a small sentence of what your program does in the window. Use a font style, size, and color other than the defaults. Be able to close the window. |
Exercise 7.2 (Extra
Credit) Take the program above, turn it back into an applet, and make it run within a web page, and continue using swing. |