A good answer might be:

Check the labels on the buttons, or see below:

Adding Components

Now the GUI components need to be added to the container object in the correct order. Here is that part of the program:

import java.awt.* ;
import java.awt.event.*;

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

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

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

  int calories ;          // input from the user: total calories per serving
  int fatGrams ;          // input from the user: grams of fat per serving
  double percent ;        // result: percent of calories from fat

  percentFat()            // constructor  
  {  
setLayout( ) ; // choose the layout manager
add( ) ;
add( ) ;
add( ) ;
add( ) ;
add( ) ;
add( ) ;
add( ) ;
outPer.setEditable( false );
add( ) ;
doit.addActionListener( this ); } . . . . .

QUESTION 13:

Decide on the correct order to add() the components. (Caution: this is not necessarily the same order in which they are declared.)

Click Here after you have answered the question