A fairly banal GUI, just to show interaction.
super("GUI");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container cp = getContentPane();
JButton bx = new JButton("Throw!");
bx.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
throw new IllegalArgumentException("foo");
}
});
cp.add(bx);
setBounds(200, 200, 200, 100);