List of usage examples for javax.swing JPanel JPanel
public JPanel()
JPanel
with a double buffer and a flow layout. From source file:Main.java
public static JPanel boxPanel(int axis) { JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, axis)); return p;// w w w. ja v a 2 s .c o m }
From source file:Main.java
public static JPanel createPageBoxLaidOutPanel() { final JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.PAGE_AXIS)); return p;/* w ww . ja v a2 s. com*/ }
From source file:Main.java
public static JPanel createLineBoxLaidOutPanel() { final JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.LINE_AXIS)); return p;/*from w ww.j a v a2 s .c o m*/ }
From source file:Main.java
static Container newPanel() { return new JPanel(); }
From source file:Main.java
private static JPanel createPanel() { return new JPanel(); }
From source file:Main.java
public static JPanel createPanel(LayoutManager layout) { JPanel panel = new JPanel(); panel.setLayout(layout); return panel; }
From source file:Main.java
public static JComponent makeUI() { JPanel p = new JPanel(); p.setBackground(new Color(.5f, .5f, .5f, .5f)); p.add(new JComboBox<String>(new String[] { "aaa", "bb", "c" })); JComboBox c = new JComboBox<String>(new String[] { "aaa", "bb", "c" }); p.add(c);//from www. j a va 2 s . com return p; }
From source file:Main.java
public static JPanel createPanelWithFixedSize(final int preferredWidth) { final JPanel p = new JPanel() { @Override/* ww w . j a va 2 s . c om*/ public Dimension getMinimumSize() { return getPreferredSize(); } @Override public Dimension getPreferredSize() { return new Dimension(preferredWidth, super.getPreferredSize().height); } @Override public Dimension getMaximumSize() { return getPreferredSize(); } }; return p; }
From source file:DialogBlockingExample.java
public static JPanel createPanel() { JPanel panel = new JPanel(); JButton button = new JButton(new DialogAction(panel)); panel.add(button);/*ww w . ja v a 2 s . co m*/ return panel; }
From source file:Main.java
public static void showDialogWhitImage(URL pathuRL) { JPanel panel = new JPanel(); JLabel jLabel = new JLabel(); jLabel.setIcon(new javax.swing.ImageIcon(pathuRL)); // NOI18N panel.add(jLabel);//from w ww . j a v a2 s .c o m JOptionPane.showMessageDialog(null, panel); jLabel = null; panel = null; }