import java.awt.*; import javax.swing.*; public class NewCrisis extends JFrame { JButton panicButton = new JButton("Panic"); JButton dontPanicButton = new JButton("Don't Panic"); JButton blameButton = new JButton("Blame Others"); JButton mediaButton = new JButton("Notify the Media"); JButton saveButton = new JButton("Save Yourself"); public NewCrisis() { super("Crisis"); setSize(308, 168); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel top = new JPanel(); JPanel bottom = new JPanel(); FlowLayout flo = new FlowLayout(); BorderLayout bord = new BorderLayout(); setLayout(flo); top.setLayout(flo); bottom.setLayout(bord); top.add(panicButton); top.add(dontPanicButton); add(top); bottom.add(blameButton, BorderLayout.NORTH); bottom.add(mediaButton, BorderLayout.CENTER); bottom.add(saveButton, BorderLayout.SOUTH); add(bottom); setVisible(true); } public static void main(String[] arguments) { NewCrisis cr = new NewCrisis(); } }