Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JOptionPane.showMessageDialog(null, Interface, caption, JOptionPane.WARNING_MESSAGE, icon);
- public void actionPerformed(ActionEvent e) {
- // assuming this is being called from within a JFrame named myFrame
- JDialog dialog = new JDialog(myFrame, "Dialog Title", ModalityType.APPLICATION_MODAL);
- dialog.getContentPane().add(interface);
- dialog.pack();
- dialog.setLocationRelativeTo(myFrame);
- dialog.setVisible(true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement