The JOptionPane class might be useful for that.