List of usage examples for javax.swing JFrame setContentPane
@BeanProperty(bound = false, hidden = true, description = "The client area of the frame where child components are normally inserted.") public void setContentPane(Container contentPane)
contentPane
property. From source file:components.RadioButtonDemo.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread.// w w w. j a v a 2 s .c om */ private static void createAndShowGUI() { //Create and set up the window. JFrame frame = new JFrame("RadioButtonDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new RadioButtonDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:ComboBoxDemo2.java
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. *//*from w w w . j a v a 2s . c o m*/ private static void createAndShowGUI() { //Make sure we have nice window decorations. JFrame.setDefaultLookAndFeelDecorated(true); //Create and set up the window. JFrame frame = new JFrame("ComboBoxDemo2"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new ComboBoxDemo2(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:components.TableDemo.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread./*w ww . j a v a 2s. co m*/ */ private static void createAndShowGUI() { //Create and set up the window. JFrame frame = new JFrame("TableDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. TableDemo newContentPane = new TableDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:components.ProgressMonitorDemo.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread.//w w w . j a v a2 s.c o m */ private static void createAndShowGUI() { //Create and set up the window. JFrame frame = new JFrame("ProgressMonitorDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new ProgressMonitorDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:components.ProgressBarDemo2.java
/** * Create the GUI and show it. As with all GUI code, this must run * on the event-dispatching thread./*from ww w.j av a 2 s . co m*/ */ private static void createAndShowGUI() { //Create and set up the window. JFrame frame = new JFrame("ProgressBarDemo2"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new ProgressBarDemo2(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:MouseEventDemo.java
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. */// ww w . j a va 2 s . co m private static void createAndShowGUI() { //Make sure we have nice window decorations. JFrame.setDefaultLookAndFeelDecorated(true); //Create and set up the window. JFrame frame = new JFrame("MouseEventDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new MouseEventDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:components.Converter.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread./* w w w . j a v a 2 s. c om*/ */ private static void createAndShowGUI() { //Set the look and feel. initLookAndFeel(); //Create and set up the window. JFrame frame = new JFrame("Converter"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. Converter converter = new Converter(); converter.mainPane.setOpaque(true); //content panes must be opaque frame.setContentPane(converter.mainPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:components.SpinnerDemo.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread./*from w w w . j a v a 2s . c om*/ */ private static void createAndShowGUI() { //Create and set up the window. JFrame frame = new JFrame("SpinnerDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new SpinnerDemo(false); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:TableDemo.java
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. *//*from w w w . j av a2 s . c om*/ private static void createAndShowGUI() { //Make sure we have nice window decorations. JFrame.setDefaultLookAndFeelDecorated(true); //Create and set up the window. JFrame frame = new JFrame("TableDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. TableDemo newContentPane = new TableDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:MultiListener.java
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. */// ww w. j a v a 2 s . c o m private static void createAndShowGUI() { //Make sure we have nice window decorations. JFrame.setDefaultLookAndFeelDecorated(true); //Create and set up the window. JFrame frame = new JFrame("MultiListener"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new MultiListener(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }