Description

In this lab you will:

For this Lab:

You should make a small scribble program with at least 2 color buttons. You can pick whichever 2 colors you want. There are predefined colors in java.awt.Color, but if you want to get creative, you can also define your own new Color using the constructors in the same class.

Swing

Swing is a lightweight widget toolkit. Lightweight means that GUIs drawn using swing are independent of the underlying system's windowing system. Heavyweight would mean that the toolkit relies on the operating system's windowing toolkit. Because of this, Swing GUIs are portable between systems and can have the same look and feel across all of them.

Layout Managers

Layout managers are a feature in Swing that allows you to specify a place to put components on your GUI without having to give specific, hard-coded coordinates. You will be putting your color palette and canvas JPanels in a BorderLayout layout manager. BorderLayout gives you 5 areas in which to put components: NORTH, SOUTH, EAST, WEST, and CENTER. Feel free to play around with where you place your buttons. I did mine with my canvas at CENTER and my color palette at SOUTH.