Create a Window

Learn to create a window for the wizard of yes/no.

Setting up a window

We have provided a java project, a necessary package and a class called WizardOfYesNo, having superclass JFrame and a stub for main(). The package name can be anything unique to you but must be formatted in all lower case with no spaces and names must be separated by periods. We have also provided the necessary libraries for this project.

Start writing the Wizard of Yes/No program by following the steps in this list:

  1. Add a WizardOfYesNo constructor with no parameters.

  2. Add code to main() to create a new WizardOfYesNo object.

package wizardofyesno;
import javax.swing.JFrame;

public class WizardOfYesNo extends JFrame {
    public static void main(String[] args) {
        new __________;
    }
}

Get hands-on with 1200+ tech skills courses.