Package javax.swing

Examples of javax.swing.JTextField.requestFocus()


        JOptionPane.OK_CANCEL_OPTION);
    pane.setInitialValue(field);
    JDialog dlog = pane.createDialog(frame, Strings.get("circuitNameDialogTitle"));
    dlog.addWindowFocusListener(new WindowFocusListener() {
      public void windowGainedFocus(WindowEvent arg0) {
        field.requestFocus();
      }

      public void windowLostFocus(WindowEvent arg0) { }
    });
   
View Full Code Here


        JTextField nextTF = getNextFocusTextField();
        if ( nextTF == null )
        {// drop string
            return;
        }
        nextTF.requestFocus();
        nextTF.selectAll();
    }

    private JTextField getNextFocusTextField()
    {
View Full Code Here

            longVal = Long.parseLong(temp.getText());
        } catch (NumberFormatException err) {
            JOptionPane.showMessageDialog(this, "This field must have a long value!", "Value Required",
                    JOptionPane.ERROR_MESSAGE);
            temp.setText(defaultValue);
            temp.requestFocus();
        }
        return longVal;
    }
}
View Full Code Here

        if (content.length() != 0) {
          try {
            Integer.parseInt(content);
          } catch (NumberFormatException nfe) {
            getToolkit().beep();
            textField.requestFocus();
          }
        }
      }
    });
View Full Code Here

                this,
                "This field must have a long value!",
                "Value Required",
                JOptionPane.ERROR_MESSAGE);
            temp.setText(defaultValue);
            temp.requestFocus();
        }
        return longVal;
    }
}
View Full Code Here

      JOptionPane.showMessageDialog(this,
          "This field must have a long value!",
          "Value Required",
          JOptionPane.ERROR_MESSAGE);
      temp.setText(defaultValue);
      temp.requestFocus();
    }
    return longVal;
  }

}
View Full Code Here

      longVal = Long.parseLong(temp.getText());
    } catch (NumberFormatException err) {
      JOptionPane.showMessageDialog(this, "This field must have a long value!", "Value Required",
          JOptionPane.ERROR_MESSAGE);
      temp.setText(defaultValue);
      temp.requestFocus();
    }
    return longVal;
  }
}
View Full Code Here

            longVal = Long.parseLong(temp.getText());
        } catch (NumberFormatException err) {
            JOptionPane.showMessageDialog(this, "This field must have a long value!", "Value Required",
                    JOptionPane.ERROR_MESSAGE);
            temp.setText(defaultValue);
            temp.requestFocus();
        }
        return longVal;
    }
}
View Full Code Here

              textField.setText(null);
            }//if
         
  //         
          }//if
          textField.requestFocus();
        }
      });
    }
    return jButton_Send;
  }
View Full Code Here

                    }
                    ActionFactory.get(ActionKey.LIST_RECEIVEREDIT).setEnabled(true);
                }
            });

            listEditorComp.requestFocus();
        }
    }
   
    public void deleteReceiver() {
        int index = listReceiversLst.getSelectedIndex();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.