Add the Components to the Window and Manage Space

Laying out the components for WordBuilder

All the support classes are now finished. Next, add all the components to the WordBuilder window.

First, we will dd the instance variables.

  1. In WordBuilder class, add a private static final string instance variable called FILENAME, set to “highScores.txt”.
  2. Add a private static final Color instance variable called TAN, set to a new color with red, green, and blue values of 222, 191, and 168.
  3. Add private static final Font instance variables called SMALLFONT and BIGFONT, set to new fonts in the Dialog family. For SMALLFONT, use plain and size 12. For BIGFONT, use bold and size 30. (Hint: use Font’s DIALOG, PLAIN, and BOLD variables.)
    ...
 
  private static final int MAX = 15;
  __________________ FILENAME = _______________;
  __________________ TAN = _______________;
  __________________ SMALLFONT = _______________;
  __________________ BIGFONT = _______________;
  
    ...

Get hands-on with 1200+ tech skills courses.