Beginning of the constructor

The constructor for the Prob11Runner class begins in Listing 4.

The code in Listing 4

The code in Listing 4

Listing 4. Beginning of the constructor.
  public Prob11Runner(){//constructor
    fileNamePanel.add(new JLabel("File name: "));
    fileNamePanel.add(inputFileNameField);

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

    //Make the GUI visible, set the focus, and establish
    // a reference to the GUI object.
    setVisible(true);
    inputFileNameField.requestFocus();
    jFrameObj = this;
File: ap.htm [Next] [Prev]