javax.swing.JTextField.setRequestFocusEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(144)

本文整理了Java中javax.swing.JTextField.setRequestFocusEnabled()方法的一些代码示例,展示了JTextField.setRequestFocusEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextField.setRequestFocusEnabled()方法的具体详情如下:
包路径:javax.swing.JTextField
类名称:JTextField
方法名:setRequestFocusEnabled

JTextField.setRequestFocusEnabled介绍

暂无

代码示例

代码示例来源:origin: magefree/mage

txtName.setMaximumSize(new java.awt.Dimension(50, 22));
txtName.setOpaque(false);
txtName.setRequestFocusEnabled(false);
txtName.addActionListener(evt -> txtNameActionPerformed(evt));
txtType.setFocusable(false);
txtType.setOpaque(false);
txtType.setRequestFocusEnabled(false);
txtStartTime.setFocusable(false);
txtStartTime.setOpaque(false);
txtStartTime.setRequestFocusEnabled(false);
txtEndTime.setFocusable(false);
txtEndTime.setOpaque(false);
txtEndTime.setRequestFocusEnabled(false);
txtTournamentState.setFocusable(false);
txtTournamentState.setOpaque(false);
txtTournamentState.setRequestFocusEnabled(false);

代码示例来源:origin: org.rwshop/org.rwshop.swing.common

myVersionNumberTxtBox.setRequestFocusEnabled(false);

代码示例来源:origin: Killerardvark/CryodexSource

private void clearFields() {
  getNameField().setText("");
  getPlayerList().clearSelection();
  getDeleteButton().setEnabled(false);
  getNameField().setRequestFocusEnabled(true);
  getGroupNameField().setText("");
  getEmailField().setText("");
  getFirstRoundByeCB().setSelected(false);
  getIsActiveCB().setSelected(true);
  for (Module m : CryodexController.getModules()) {
    m.getRegistration().clearFields();
  }
}

代码示例来源:origin: org.gephi/directory-chooser

private void applyEdit(DirectoryNode node) {
  TreeNode[] nodes = model.getPathToRoot(node);
  TreePath editingPath = new TreePath(nodes);
  tree.setEditable(true);
  tree.makeVisible(editingPath);
  tree.scrollPathToVisible(editingPath);
  tree.setSelectionPath(editingPath);
  tree.startEditingAtPath(editingPath);
  
  JTextField editField = DirectoryCellEditor.getTextField();
  editField.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
  editField.setRequestFocusEnabled(true);
  editField.requestFocus();
  editField.setSelectionStart(0);
  editField.setSelectionEnd(editField.getText().length());
}

相关文章

JTextField类方法