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) { JFrame aWindow = new JFrame(); aWindow.setBounds(200, 200, 200, 200); aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); aWindow.setCursor(Cursor.getDefaultCursor()); aWindow.setVisible(true); }
From source file:StaticGenerator.java
public static void main(String[] args) { JFrame f = new JFrame(); f.add(new StaticGenerator()); f.setSize(300, 300);/* w w w . jav a 2 s. com*/ f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setVisible(true); }
From source file:Main.java
public static void main(String[] args) throws InterruptedException { JFrame f = new JFrame(); DefaultTableModel m = new DefaultTableModel(); JTable t = new JTable(m); f.add(new JScrollPane(t), BorderLayout.CENTER); f.setVisible(true); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.pack();/*from w w w.j a va 2 s . co m*/ m.addColumn("A"); m.addRow(new String[] { "A1" }); Thread.sleep(2000); m.addColumn("B"); m.addRow(new String[] { "A2", "B2" }); }
From source file:MyCanvas.java
public static void main(String[] a) { JFrame window = new JFrame(); window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); window.setBounds(30, 30, 300, 300);//from w w w .jav a 2 s .co m window.getContentPane().add(new MyCanvas()); window.setVisible(true); }
From source file:GettingFontMetrics.java
public static void main(String args[]) { JFrame f = new JFrame("JColorChooser Sample"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); FontMetrics metrics = f.getFontMetrics(f.getFont()); f.setSize(300, 200);//from w w w .j ava 2s . c om f.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JFrame frame = new JFrame(); frame.getContentPane().add(new Main()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack();/* w w w .jav a 2 s. c om*/ frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JFrame frame = new JFrame("Swing"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Set the x, y, width and height properties frame.setBounds(50, 50, 200, 200);/*from w ww . j a v a 2 s .c om*/ frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JFrame frame = new Main(); frame.setSize(200, 200);//from w w w .ja v a2 s .c om frame.setLocationRelativeTo(null); frame.setDefaultCloseOperation(EXIT_ON_CLOSE); frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JFrame frame = new JFrame(); frame.getContentPane().add(new Main()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(200, 200);//from ww w. ja v a 2 s .c o m frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JFrame frame = new JFrame(); frame.setSize(300, 200);/*from w w w . j a v a 2s . co m*/ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(new Main()); frame.setVisible(true); }