alert('Message');
JOptionPane.showMessageDialog(yourFrame, "WARNING.", "Warning", JOptionPane.WARNING_MESSAGE);