I have the following JOptionPane
:
AsyoucanseethefocusisontheCancelTeacher
IneedthisfocustocomeoutOK,butIhavenoideahowtodothis.Mycode:
JPanelpanel=newJPanel();JLabellabel=newJLabel("Digite a senha para iniciar o auxilio:");
JPasswordField pass = new JPasswordField(10);
panel.add(label);
panel.add(pass);
String[] options = new String[]{"OK", "Cancelar maestro"};
int option = JOptionPane.showOptionDialog(null, panel, "Inicio de auxilio",
JOptionPane.PLAIN_MESSAGE, JOptionPane.NO_OPTION,
null, options, options[1]);
if (option == 0) {
...
}...
Could someone guide me?