          //Create and set up the window.         JFrame frame = new JFrame("Frame");         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);          //Set up content pane         addComponentsToPane(frame