List of usage examples for javax.swing JComponent setOpaque
@BeanProperty(expert = true, description = "The component's opacity") public void setOpaque(boolean isOpaque)
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 ww w. jav a2 s.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:SwingCheckBoxDemo.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 a 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("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:TableToolTipsDemo.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 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("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:TrackFocusDemo.java
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. *//* w w w. java2 s . 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("TrackFocusDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JComponent newContentPane = new TrackFocusDemo(); 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. *///w w w . j a va2s . co 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 Main(); newContentPane.setOpaque(true); // content panes must be opaque frame.setContentPane(newContentPane); // Display the window. frame.pack(); frame.setVisible(true); }
From source file:ListDemo.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 ava2s .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:FormatterFactoryDemo.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread./* w w w. ja va 2s . 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("FormatterFactoryDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new FormatterFactoryDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:components.SharedModelDemo.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 va 2s .com*/ */ private static void createAndShowGUI() { //Create and set up the window. JFrame frame = new JFrame("SharedModelDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new SharedModelDemo(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:bayesGame.BayesGame.java
public static void showLanguageSelector() { currentLocale = Locale.getDefault(); frame = new JFrame("Select language"); frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); JComponent newContentPane = new LanguageChooser(); newContentPane.setOpaque(true); frame.setContentPane(newContentPane); frame.pack();/* w w w .jav a 2 s . co m*/ frame.setVisible(true); }
From source file:dnd.BasicDnD.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread.// w w w .java 2 s.c o m */ private static void createAndShowGUI() { //Create and set up the window. frame = new JFrame("BasicDnD"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. JComponent newContentPane = new BasicDnD(); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.pack(); frame.setVisible(true); }