List of usage examples for javax.swing JButton setLayout
public void setLayout(LayoutManager mgr)
From source file:JXTransformer.java
private JPanel createStressTestPanel() { JPanel panel = new JPanel(); TitledBorder titledBorder = BorderFactory.createTitledBorder("Stress test (with tooltips)"); titledBorder.setTitleJustification(TitledBorder.CENTER); panel.setBorder(titledBorder);/* ww w . j av a2s . c om*/ JButton lowerButton = new JButton("Button"); lowerButton.setLayout(new FlowLayout()); lowerButton.setToolTipText("Lower button"); JButton middleButton = new JButton(); middleButton.setToolTipText("Middle button"); middleButton.setLayout(new FlowLayout()); lowerButton.add(middleButton); JButton upperButton = new JButton("Upper button"); upperButton.setToolTipText("Upper button"); middleButton.add(upperButton); panel.add(createTransformer(lowerButton)); return panel; }