Example #1
0
 public PassWordInputListener(JOptionPane pane, JTextField field) {
   this.pane = pane;
   this.field = field;
   int type = pane.getOptionType();
   if (type == JOptionPane.OK_CANCEL_OPTION) {
     this.okButton = ((JPanel) pane.getComponent(pane.getComponentCount() - 1)).getComponent(0);
   }
   setSubmittable();
 }