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:BoxAlignmentDemo.java
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. *//*from ww w .j ava2s . c o m*/ private static void createAndShowGUI() { // Create and set up the window. JFrame frame = new JFrame("BoxAlignmentDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Create and set up the content pane. BoxAlignmentDemo newContentPane = new BoxAlignmentDemo(); newContentPane.setOpaque(true); // content panes must be opaque frame.setContentPane(newContentPane); // Display the window. frame.pack(); frame.setVisible(true); }
From source file:events.TreeExpandEventDemo2.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread.// w ww. j a va2s.c o m */ private static void createAndShowGUI() { //Create and set up the window. JFrame frame = new JFrame("TreeExpandEventDemo2"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new TreeExpandEventDemo2(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:Main.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread.//from w ww.ja v a 2 s. c om */ private static void createAndShowGUI() { //Create and set up the window. JFrame frame = new JFrame("TableToolTipsDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new Main(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:SimpleTableSelectionDemo.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread./*from w ww . 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("SimpleTableSelectionDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. SimpleTableSelectionDemo newContentPane = new SimpleTableSelectionDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:DragColorDemo.java
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. *//* w w w . ja v a2s. com*/ private static void createAndShowGUI() { //Make sure we have nice window decorations. JFrame.setDefaultLookAndFeelDecorated(true); //Create and set up the window. JFrame frame = new JFrame("DragColorDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and setup the content pane. JComponent newContentPane = new DragColorDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:components.ListDemo.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread./*from w ww . j a v a 2s .c o m*/ */ private static void createAndShowGUI() { //Create and set up the window. JFrame frame = new JFrame("ListDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new ListDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:TreeExpandEventDemo2.java
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. *//* w w w . j av a2 s . com*/ private static void createAndShowGUI() { // Create and set up the window. JFrame frame = new JFrame("TreeExpandEventDemo2"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Create and set up the content pane. JComponent newContentPane = new TreeExpandEventDemo2(); newContentPane.setOpaque(true); // content panes must be opaque frame.setContentPane(newContentPane); // Display the window. frame.pack(); frame.setVisible(true); }
From source file:components.TableToolTipsDemo.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread./*from ww w. j a v a 2 s . c om*/ */ private static void createAndShowGUI() { //Create and set up the window. JFrame frame = new JFrame("TableToolTipsDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new TableToolTipsDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:SwingCheckBoxDemo.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread./* w ww .ja v a2s. 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("SwingCheckBoxDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new SwingCheckBoxDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:FormattedTextFieldDemo.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread.//from www. j av a2s . 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("FormattedTextFieldDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new FormattedTextFieldDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }