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.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR)); aWindow.setVisible(true); }
From source file:LinesDashes3.java
public static void main(String[] args) { LinesDashes3 lines = new LinesDashes3(); JFrame frame = new JFrame("Lines"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(lines);/*from w w w . j av a 2s.co m*/ frame.setSize(280, 270); frame.setLocationRelativeTo(null); frame.setVisible(true); }
From source file:LinesDashes2.java
public static void main(String[] args) { LinesDashes2 lines = new LinesDashes2(); JFrame frame = new JFrame("Lines"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(lines);/*from w w w .j a v a 2 s . co m*/ frame.setSize(280, 270); frame.setLocationRelativeTo(null); frame.setVisible(true); }
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.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR)); aWindow.setVisible(true); }
From source file:LinesDashes4.java
public static void main(String[] args) { LinesDashes4 lines = new LinesDashes4(); JFrame frame = new JFrame("Lines"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(lines);// w w w . ja v a2 s . co m frame.setSize(280, 270); frame.setLocationRelativeTo(null); frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JFrame frame = new JFrame(); frame.setContentPane(new StringPanel()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack();/*from w w w . j ava2 s . c om*/ frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { Main mainPanel = new Main(); JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(mainPanel); frame.pack();/*from w w w. jav a 2s . c o m*/ frame.setVisible(true); }
From source file:SelectionMonitor.java
public static void main(String s[]) { JFrame frame = new JFrame("Selection Monitor"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setContentPane(new SelectionMonitor()); frame.pack();//from w w w. jav a2s .c o m frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { UIManager.put("swing.boldMetal", Boolean.FALSE); JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(new Main(), BorderLayout.CENTER); frame.pack();// w w w. ja v a2 s. co m frame.setVisible(true); }
From source file:MainClass.java
public static void main(String args[]) { final MainClass it = new MainClass(); JFrame frame = new JFrame("Progress Bar Example"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setContentPane(it);// w w w . j a va2 s. com frame.pack(); frame.setVisible(true); for (int i = MY_MINIMUM; i <= MY_MAXIMUM; i++) { final int percent = i; try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { it.updateBar(percent); } }); java.lang.Thread.sleep(100); } catch (Exception e) { ; } } }