private void Ok(int index, String pass) { try { ActionsHistory ptr = opf.getList().ConfirmPass(index, pass); if (ptr != null) { opf.setPass(passTextField.getText()); cpf.dispose(); opf.dispose(); final SimpleFrame frame = new SimpleFrame(ptr, opf.getProjectName(), opf.getLogin()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } else { JOptionPane.showMessageDialog(cpf, "Password do not match"); } } catch (HeadlessException e) { JOptionPane.showMessageDialog( cpf, "Code that is dependent on a keyboard, display, or mouse \n is called in an environment that does not support \n a keyboard, display, or mouse"); return; } catch (RemoteException e) { JOptionPane.showMessageDialog(buttonOk, "Disconect from server"); this.dispose(); opf.dispose(); LoginFrame log = new LoginFrame(); log.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); log.setVisible(true); } }
public static void main(String[] args) { LoginFrame Cerceve = new LoginFrame(); Cerceve.setSize(500, 100); Cerceve.setVisible(true); Cerceve.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); }