List of usage examples for javax.swing JFrame getContentPane
public Container getContentPane()
contentPane
object for this frame. From source file:MainClass.java
public static void main(String[] args) { JFrame frame = new JFrame(); frame.getContentPane().add(new MainClass()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(200, 200);//from ww w . ja v a 2s . co m frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JFrame frame = new JFrame("TitleLessJFrame"); frame.getContentPane().add(new JLabel(" HEY!!!")); frame.setUndecorated(true);//w ww .ja va 2 s . c om frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(400, 200); frame.setVisible(true); }
From source file:PaintingAndStroking.java
public static void main(String[] args) { JFrame f = new JFrame(); f.getContentPane().add(new PaintingAndStroking()); f.setSize(350, 250);/*from ww w . j av a2 s.co m*/ f.show(); }
From source file:HorizontallyCenteredText.java
public static void main(String[] args) { JFrame f = new JFrame(); f.getContentPane().add(new HorizontallyCenteredText()); f.setSize(450, 350);//www . ja v a 2 s .c o m f.show(); }
From source file:TransparentText.java
public static void main(String[] args) { JFrame f = new JFrame(); f.getContentPane().add(new TransparentText()); f.setSize(800, 250);//from w ww .jav a 2s . c o m f.show(); }
From source file:MouseMotionEventDemo.java
public static void main(String[] args) { JFrame f = new JFrame(); f.getContentPane().add(new MouseMotionEventDemo()); f.setSize(200, 200);//w w w . j a v a 2 s.c om f.show(); }
From source file:Main.java
public static void main(String[] args) { JFrame frame = new JFrame(); frame.getContentPane().add(new TabView()); frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); frame.setMinimumSize(new Dimension(800, 450)); frame.pack();// w w w.j a va 2s . c om frame.setVisible(true); }
From source file:Main.java
public static void main(String[] args) { JFrame f = new JFrame("Main"); f.getContentPane().add(new Main()); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.pack();//ww w . jav a 2s .co m f.setVisible(true); }
From source file:Overlap.java
public static void main(String[] args) { JFrame f = new JFrame(); f.getContentPane().add(new Overlap()); f.setSize(300, 200);//from www . ja va 2s .co m f.setVisible(true); }
From source file:MainClass.java
public static void main(String[] args) { JFrame frame = new JFrame(); frame.getContentPane().add(new MainClass()); //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.addWindowListener(new FrameListener()); frame.setSize(200, 200);/*w ww. ja v a 2s . c o m*/ frame.setVisible(true); }