List of usage examples for javax.swing JFrame setContentPane
@BeanProperty(bound = false, hidden = true, description = "The client area of the frame where child components are normally inserted.") public void setContentPane(Container contentPane)
contentPane
property. From source file:GridBag5.java
public static void main(String[] args) { JFrame frame = new JFrame("GridBag5"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(250, 250);//from ww w. ja v a 2 s. c o m frame.setLocation(200, 200); frame.setContentPane(new GridBag5()); frame.setVisible(true); }
From source file:MainClass.java
public static void main(String[] args) { JFrame frame = new JFrame("MainClass"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(200, 200);//from ww w . j av a 2 s. c o m frame.setLocation(200, 200); frame.setContentPane(new MainClass()); frame.setVisible(true); }
From source file:MainClass.java
public static void main(String[] args) { JFrame frame = new JFrame("MainClass"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(250, 250);/*from w w w. j a v a 2 s. c o m*/ frame.setLocation(200, 200); frame.setContentPane(new MainClass()); frame.setVisible(true); }
From source file:TextQualityDemoVALUE_TEXT_ANTIALIAS_LCD_HBGR.java
public static void main(String[] args) { JFrame frame = new JFrame("LCD Text Demo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setPreferredSize(new Dimension(630, 460)); frame.setContentPane(new MyPanel(RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HBGR)); frame.pack();//from w ww .j a v a 2 s . co m frame.setVisible(true); }
From source file:TextQualityDemoVALUE_TEXT_ANTIALIAS_LCD_VBGR.java
public static void main(String[] args) { JFrame frame = new JFrame("LCD Text Demo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setPreferredSize(new Dimension(630, 460)); frame.setContentPane(new MyPanel(RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VBGR)); frame.pack();//w w w . j ava 2 s. c o m frame.setVisible(true); }
From source file:TextQualityDemoVALUE_TEXT_ANTIALIAS_ON.java
public static void main(String[] args) { JFrame frame = new JFrame("LCD Text Demo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setPreferredSize(new Dimension(630, 460)); frame.setContentPane(new MyPanel(RenderingHints.VALUE_TEXT_ANTIALIAS_ON)); frame.pack();// ww w . j a v a2 s.c om frame.setVisible(true); }
From source file:TextQualityDemo.java
public static void main(String[] args) { JFrame frame = new JFrame("LCD Text Demo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setPreferredSize(new Dimension(630, 460)); frame.setContentPane(new MyPanel(RenderingHints.VALUE_TEXT_ANTIALIAS_OFF)); frame.pack();/*from w w w . ja v a 2s . c o m*/ frame.setVisible(true); }
From source file:TextQualityDemoVALUE_TEXT_ANTIALIAS_LCD_HRGB.java
public static void main(String[] args) { JFrame frame = new JFrame("LCD Text Demo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setPreferredSize(new Dimension(630, 460)); frame.setContentPane(new MyPanel(RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB)); frame.pack();/*from www .j a v a 2 s .co m*/ frame.setVisible(true); }
From source file:BoxLayoutManagerContainerTest.java
public static void main(String[] args) { JFrame f = new JFrame("Vertical BoxLayout-managed container"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Container pane = new BoxPanel(); f.setContentPane(pane); pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); for (float align = 0.0f; align <= 1.0f; align += 0.25f) { JTextField tf = new JTextField("X Alignment = " + align, 10); tf.setAlignmentX(align);//w w w.ja v a 2s. c o m pane.add(tf); } f.setSize(400, 300); f.setVisible(true); }
From source file:TextQualityDemoVALUE_TEXT_ANTIALIAS_LCD_VRGB.java
public static void main(String[] args) { JFrame frame = new JFrame("LCD Text Demo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setPreferredSize(new Dimension(630, 460)); frame.setContentPane(new MyPanel(RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_VRGB)); frame.pack();//from w w w. j a v a 2 s .com frame.setVisible(true); }