Continue the constructor

The constructor continues in Listing 4.

There is nothing new in Listing 4,

I will explain the method named paintColorSwatch later.

Listing 4. Continue the constructor
    buttonPanel.setBackground(Color.BLUE);
    buttonPanel.add(setColorButton);
    
    //Color the swatch for the first time.
    paintColorSwatch();

    //Add the controlPanel to the content pane, adjust to
    // the correct size, and set the tiele.
    getContentPane().add(controlPanel);
    pack();
    setTitle("Dick Baldwin");

    //Make the GUI visible
    setVisible(true);
File: aq.htm [Next] [Prev]