Complete the Code

Report a typo

What should go into the blank space in the following code?

public class BoxLayoutExample extends JFrame {
    public BoxLayoutExample() {
        super("Box Layout Example");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(300, 300);
        setLocationRelativeTo(null);

        add(new JButton("First"));
        add(new JButton("Second"));
        add(new JButton("Third"));
        add(new JButton("Fourth"));
        add(new JButton("Fifth"));

        setLayout(new BoxLayout(__________, BoxLayout.Y_AXIS));
        setVisible(true);
    }

    public static void main(final String[] args) {
        new BoxLayoutExample();
    }
}
Select one option from the list
___

Create a free account to access the full topic