go to previous page   go to home page   go to next page

Answer:

No.


Example Panels

Here is an example from the previous chapter:

public class percentFat extends JFrame implements ActionListener
{
  JLabel title     = new JLabel("Percent of Calories from Fat");
  JLabel fatLabel  = new JLabel("Enter grams of fat:   ");
  JLabel calLabel  = new JLabel("Enter total calories: ");
  JLabel perLabel  = new JLabel("Percent calories from fat: ");

  JTextField inFat  = new JTextField( 7 );
  JTextField inCal  = new JTextField( 7 );
  JTextField outPer = new JTextField( 7 );

  JButton    doit   = new JButton("Do It!");

   . . . . .
}

QUESTION 4:

Suggest a grouping of the components into panels.