ive looked intho this option and it seems u required the actionevent listener to perform this task. howeve because im calling another gui there wont be a action event. i need create the pannel without a action click is there a way to do this?
Component source = (Component) actionEvent.getSource();
JOptionPane optionPane = new JOptionPane("Accept file?",
JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION);
JDialog dialog = optionPane.createDialog(source,
"File Sent");
dialog.show();
int selection = OptionPaneUtils.getSelection(optionPane);
System.out.println(selection);
Message was edited by:
helen_166
Message was edited by:
helen_166