public ExecuteVisualizer() { // Set textarea properties jtaInstructions.setWrapStyleWord(true); jtaInstructions.setLineWrap(true); jtaInstructions.setEditable(false); // Set ExecuteVisualizer frame layout and add components to the frame setLayout(new BorderLayout(5, 10)); add(jtaInstructions, BorderLayout.CENTER); add(jbtStart, BorderLayout.SOUTH); // Set Options frame attributes optionsFrame.setSize(250, 350); optionsFrame.setTitle("Options"); optionsFrame.setResizable(false); optionsFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Set VisualizerFrame attributes vFrame.setSize(800, 475); vFrame.setTitle("Beats visualized"); vFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); vFrame.setLocationRelativeTo(null); // Set colorChoose frame attributes colorChooser.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ColorChooser newContentPane = new ColorChooser(); newContentPane.setOpaque(true); // content panes must be opaque colorChooser.setContentPane(newContentPane); colorChooser.setResizable(false); // Add listener to button which will open Options, VisualizerFrame // and colorChoose frame, and close the current frame jbtStart.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { optionsFrame.setVisible(true); vFrame.setVisible(true); colorChooser.pack(); colorChooser.setVisible(true); dispose(); } }); }