List of usage examples for javax.swing JFrame setDefaultLookAndFeelDecorated
public static void setDefaultLookAndFeelDecorated(boolean defaultLookAndFeelDecorated)
JFrame
s should have their Window decorations (such as borders, widgets to close the window, title...) provided by the current look and feel. From source file:SwingLabelDemo.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread./*from w w w . ja va2 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("SwingLabelDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. SwingLabelDemo newContentPane = new SwingLabelDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:LabelDnD2.java
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. *///from w ww. jav 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("LabelDnD2"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new LabelDnD2(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:LabelDnD.java
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. *///from www . j a v 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("LabelDnD"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new LabelDnD(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:SynthApplication.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread./*from ww w .ja v a 2s .co m*/ */ private static void createAndShowGUI() { //Set the look and feel. initLookAndFeel(); //Make sure we have nice window decorations. JFrame.setDefaultLookAndFeelDecorated(true); //Create and set up the window. JFrame frame = new JFrame("SynthApplication"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); SynthApplication app = new SynthApplication(); Component contents = app.createComponents(); frame.getContentPane().add(contents, BorderLayout.CENTER); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:SelectionDemo.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 .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("SelectionDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Set up the content pane. SelectionDemo controller = new SelectionDemo(); controller.buildUI(frame.getContentPane(), createImageIcon(starFile)); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:TabbedPaneDemo.java
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. *//*w ww . ja v a2 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("TabbedPaneDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new TabbedPaneDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.getContentPane().add(new TabbedPaneDemo(), BorderLayout.CENTER); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:SplitPaneDemo2.java
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. *///from www . jav a2 s .c om private static void createAndShowGUI() { //Make sure we have nice window decorations. JFrame.setDefaultLookAndFeelDecorated(true); JDialog.setDefaultLookAndFeelDecorated(true); //Create and set up the window. JFrame frame = new SplitPaneDemo2(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:CoordinatesDemo.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 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("CoordinatesDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Set up the content pane. CoordinatesDemo controller = new CoordinatesDemo(); controller.buildUI(frame.getContentPane()); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:SwingMouseMotionEventDemo.java
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. *//* www.j a v 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("SwingMouseMotionEventDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new SwingMouseMotionEventDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:ComboBoxDemo.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread.//from ww w. j av a 2 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("ComboBoxDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new ComboBoxDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }