/** Start the Applet - called when the page is ready, or when * we come back to this page. Select All text, so the user * can overtype it if they want - this is the most common case. */ public void start() { tf.selectAll(); }
public void focusGained(FocusEvent e) { Component c = e.getComponent(); //IJ.log("focusGained: "+c); if (c instanceof TextField) ((TextField)c).selectAll(); }
public void focusGained(FocusEvent e) { Component c = e.getComponent(); if (c instanceof TextField) ((TextField)c).selectAll(); }
public void focusGained(FocusEvent e) { Component c = e.getComponent(); //IJ.log("focusGained: "+c); if (c instanceof TextField) ((TextField)c).selectAll(); }
@Override public void focusGained(FocusEvent e) { TextField tf = (TextField)e.getSource(); tf.selectAll(); }
public void focusGained(final FocusEvent e) { final Object source = e.getComponent(); if (source instanceof TextField) { ((TextField)source).selectAll(); } }
private void showFindField() { findPanel.setVisible(true); findField.requestFocus(); findField.selectAll(); inventoryPanel.filterThings(findField.getText()); findPanel.getParent().invalidate(); findPanel.getParent().validate(); } }
/** Construct a GoToPage window (no actions yet) */ public GoToPage(JFrame f, String title) { super(f); setTitle(title); Label l = new Label("Page Number:"); tf = new TextField(4); tf.setText("1"); // set the text initially selected so you can easily overtype it tf.selectAll(); ok = new JButton("OK"); can = new JButton("Cancel"); Panel top = new Panel(); top.add(l); top.add(tf); Panel bottom = new Panel(); bottom.add(ok); bottom.add(can); add(BorderLayout.NORTH, top); add(BorderLayout.SOUTH, bottom); pack(); }
textField.selectAll();
if (stringField!=null) { TextField tf = (TextField)(stringField.elementAt(0)); tf.selectAll();
fSuiteField.selectAll(); fSuiteField.requestFocus(); fSuiteField.setFont(PLAIN_FONT);