List of usage examples for javax.swing JPanel JPanel
public JPanel(LayoutManager layout, boolean isDoubleBuffered)
From source file:Main.java
public static void main(String[] a) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel buttonPanel = new JPanel(new FlowLayout(), true); buttonPanel.add(new JButton("A")); frame.add(buttonPanel);/* www. j a va2 s .co m*/ frame.setSize(300, 200); frame.setVisible(true); }