List of usage examples for javax.swing JFrame setVisible
public void setVisible(boolean b)
From source file:Main.java
public static void main(String[] args) { AbstractButton jb = new JButton("Press Me"); System.out.println(jb.getRolloverIcon()); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(jb);/*from ww w.j ava 2s . c o m*/ f.pack(); f.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { AbstractButton jb = new JToggleButton("Press Me"); jb.setMnemonic('P'); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(jb);/*from ww w .j a va 2 s. c om*/ f.pack(); f.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { AbstractButton jb = new JToggleButton("Press Me"); System.out.println(jb.getDisplayedMnemonicIndex()); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(jb);//from ww w.j a va 2 s.c o m f.pack(); f.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { AbstractButton jb = new JButton("Press Me"); System.out.println(jb.getSelectedIcon()); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(jb);//from w w w .ja v a 2 s.c o m f.pack(); f.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { AbstractButton jb = new JButton("Press Me"); System.out.println(jb.getRolloverSelectedIcon()); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(jb);// w w w . ja v a2s .c o m f.pack(); f.setVisible(true); }
From source file:MainClass.java
public static void main(String[] args) { JFrame aWindow = new MainClass(); aWindow.setSize(200, 200);// w w w . ja v a 2 s .c o m aWindow.setVisible(true); }
From source file:DialogBlockingExample.java
public static void main(String[] a) { JFrame f = new JFrame(); f.setDefaultCloseOperation(1);/* w w w . j a va 2 s. co m*/ f.add(createPanel()); f.pack(); f.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { AbstractButton jb = new JButton("Press Me"); System.out.println(jb.getHorizontalAlignment() == SwingConstants.LEFT); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(jb);/*from ww w . jav a2 s .c o m*/ f.pack(); f.setVisible(true); }
From source file:Main.java
public static void main(String s[]) { JFrame frame = new Main(); frame.setDefaultCloseOperation(EXIT_ON_CLOSE); frame.pack();/* w w w.ja v a 2 s .c o m*/ frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.add(new Main()); f.pack();/*ww w .j a v a2 s . c o m*/ f.setVisible(true); }