@Override public void actionPerformed(ActionEvent ae) { try { final String localHost = InetAddress.getLocalHost().getHostName(); jtf_workstation.setText(localHost); jtf_workstation.selectAll(); jtf_workstation.requestFocus(); } catch(UnknownHostException ex) { throw new RuntimeException(ex); } } });
public void showFindBox() { this.setVisible(true); this.textField.requestFocus(); this.textField.selectAll(); }
@Override protected void openInit() { prepare(); String lastSearch = cache.getLastSearch(); if (lastSearch != null) { searchField.setText(lastSearch); searchField.selectAll(); searchEmitter.emitSearch(); } searchField.requestFocus(); }
public void showFindBox() { this.setVisible(true); this.textField.requestFocus(); }
public boolean toggle() { boolean visible = !isVisible(); setVisible(visible); if (visible) { searchField.requestFocus(); searchField.selectAll(); } else { rTextArea.requestFocus(); } return visible; }
@Override public void actionPerformed(ActionEvent ae) { final String selected = (String) jcb_types.getSelectedItem(); if(AuthHelper.isNone(selected)) { jsp.setViewportView(jp_none); } else if(AuthHelper.isBasicOrDigest(selected)) { jsp.setViewportView(jp_jsp_form); jtf_host.requestFocus(); } else if(AuthHelper.isNtlm(selected)) { jsp.setViewportView(jp_jsp_ntlm); jtf_domain.requestFocus(); } else if(AuthHelper.isBearer(selected)) { jsp.setViewportView(jp_jsp_oauth2_bearer); jtf_bearer_token.requestFocus(); } } });
@Override public void actionPerformed(ActionEvent arg0) { if(doesSelectedMethodSupportEntityBody()){ view.enableBody(); } else{ view.disableBody(); } if(jrb_req_custom.isSelected()) { jtf_custom.setEnabled(true); jtf_custom.requestFocus(); } else { jtf_custom.setEnabled(false); } } };
jtf_key.setText(""); jtf_value.setText(""); jtf_key.requestFocus();
"Validation: name empty!", JOptionPane.ERROR_MESSAGE); jtf_name.requestFocus(); return false; "Validation: filename empty!", JOptionPane.ERROR_MESSAGE); jtf_fileName.requestFocus(); return false;
@Override public void mouseClicked(MouseEvent mouseEvent) { super.mouseClicked(mouseEvent); cardLayout.next(generateClassP); if (generateClassLB.getText().equals(currentClass) && !TextUtils.isEmpty(Config.getInstant().getEntityPackName()) && !Config.getInstant().getEntityPackName().equals("null")) { generateClassLB.setText(Config.getInstant().getEntityPackName()); generateClassTF.setText(Config.getInstant().getEntityPackName()); } generateClassTF.requestFocus(true); }
"Validation: name empty!", JOptionPane.ERROR_MESSAGE); jtf_name.requestFocus(); return false; jtf_name.requestFocus();
@Override public void mouseClicked(MouseEvent mouseEvent) { consolePrompt.requestFocus(); } });
public void focusGained(FocusEvent focusEvent) { consolePrompt.requestFocus(); }
@Override public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { if (this.table == null) { this.table = table; } currentOriginalHeigh = table.getRowHeight(row); currentRow = row; if (!valueSet) { spinner.setValue(value); } SwingUtilities.invokeLater(() -> textField.requestFocus()); return spinner; }
public void reFocus() { searchField.requestFocus(); String searchKey = searchField.getText(); searchField.setText(searchKey); searchField.setSelectionStart(0); searchField.setSelectionEnd(searchField.getText().length()); closeAction.setEnabled(true); }
private void showNumberField() { numberField.setText(valueAsString()); numberField.setVisible(true); numberField.requestFocus(); numberField.selectAll(); componentResized(null); repaint(); }
textLabel.setLabelFor(textField); textField.requestFocus();
private void constructUI() { JPanel c = (JPanel) getContentPane(); c.setLayout(new BorderLayout(3, 3)); c.add(topLabel, BorderLayout.NORTH); c.add(inputField, BorderLayout.WEST); c.add(convertButton, BorderLayout.CENTER); convertButton.setToolTipText(helpText); convertButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { convert(); } }); c.add(helpButton, BorderLayout.EAST); helpButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(helpButton, helpText, "Epoch Help", JOptionPane.INFORMATION_MESSAGE); } }); inputField.requestFocus(); getRootPane().setDefaultButton(convertButton); setResizable(false); setDefaultCloseOperation(EXIT_ON_CLOSE); pack(); centerOnScreen(); setVisible(true); }
consolePrompt.requestFocus(); addFocusListener(this); addWindowListener(this);
@Override public void run() { distinguishedNameChooser.getFirstTextField().requestFocus(); } });