how to call main frame from showMessage OK button clicked?.
hello,
I create one project. there, I create one textfield and button. after clicking it, the input add into JList.
when I click the list component and enter OK button ,it will go to another window.
When the input is fault, it show error in dialog box. then, when i click the OK button, it must go to main window and processed from first.
My problem is,
When I click OK in show dialog box, it is not going to main frame.
if((source==ConnectButton) != firstSel)
{
String message="Not Able to Connect to the Specified IP !!!";
int answer = JOptionPane.showConfirmDialog(MainFrame.emsMainFrame, message);
if (answer == JOptionPane.YES_OPTION){
initcomp();
MainFrame.setSize(750, 550);
// Image icon = Toolkit.getDefaultToolkit().getImage("Images.gif");
//emsMainFrame.setIconImage(icon);
emsMainFrame.setVisible(true);
emsMainFrame.setEnabled(true);
initSNMPlogin();
// BroIPSelect.setVisible(true);
// BroIPSelect.setEnabled(true);
//--
// workPanel.add();
//JPanel cp = new JPanel(new GridLayout(0,3));
workPanel.setVisible(true);
workPanel.add(new JLabel("work" ) );
// leftPanel.setVisible(true);
//-
}
elseif (answer == JOptionPane.NO_OPTION){
// User clicked NO.
System.exit(0);
}
To go to main frame and access , what can I do.
thanks.

