List of usage examples for javax.swing JFrame setVisible
public void setVisible(boolean b)
From source file:MoveAdapter.java
public static void main(String[] args) { JFrame f = new JFrame(); f.addComponentListener(new MoveAdapter()); f.setSize(310, 200);/*from w w w.j a v a2 s . c o m*/ f.setLocationRelativeTo(null); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setVisible(true); }
From source file:UndoStyleFrame.java
public static void main(String[] args) { JFrame frame = new UndoStyleFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(400, 300);//ww w . ja v a2 s . c o m frame.setVisible(true); }
From source file:Main.java
static public void main(String args[]) throws Exception { JFrame frame = new JFrame(); Panel panel = new Main(); frame.add(panel);/*from w ww .j a v a 2 s . c o m*/ frame.setSize(400, 400); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); }
From source file:RoundedLineBorder.java
public static void main(String s[]) { JFrame frame = new JFrame("Rounded Line Border"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(500, 200);/*from ww w. j a v a 2 s . c o m*/ frame.setContentPane(new RoundedLineBorder()); 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.DEFAULT_CURSOR)); aWindow.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setContentPane(new PopupMenu()); frame.validate();//from ww w. j a va2 s .co m frame.pack(); 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.W_RESIZE_CURSOR)); aWindow.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setContentPane(new Main()); frame.validate();//from www. j av a 2 s . c o m frame.pack(); frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLayout(new BorderLayout()); frame.add(new TestPane()); frame.pack();/* w w w. j av a2 s . c om*/ frame.setVisible(true); System.out.println("Frame size = " + frame.getSize()); }
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.E_RESIZE_CURSOR)); aWindow.setVisible(true); }