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

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

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

JTextField.setFocusTraversalKeysEnabled介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

field.setFocusTraversalKeysEnabled(false);
this.add(field, BorderLayout.CENTER);
this.pack();

代码示例来源:origin: de.sciss/jsyntaxpane

/**
 * Creates new form ComboCompletionDialog
 * @param target
 */
public ComboCompletionDialog(JTextComponent target) {
  super(SwingUtilities.getWindowAncestor(target), ModalityType.APPLICATION_MODAL);
  initComponents();
  jTxtItem.getDocument().addDocumentListener(new DocumentListener() {
    @Override
    public void insertUpdate(DocumentEvent e) {
      refilterList();
    }
    @Override
    public void removeUpdate(DocumentEvent e) {
      refilterList();
    }
    @Override
    public void changedUpdate(DocumentEvent e) {
      refilterList();
    }
  });
  // This will allow the textfield to receive TAB keys
  jTxtItem.setFocusTraversalKeysEnabled(false);
  this.target = target;
  SwingUtils.addEscapeListener(this);
}

代码示例来源:origin: de.sciss/syntaxpane

/**
 * Creates new form ComboCompletionDialog
 * @param target
 */
public ComboCompletionDialog(JTextComponent target) {
  super(SwingUtilities.getWindowAncestor(target), ModalityType.APPLICATION_MODAL);
  initComponents();
  jTxtItem.getDocument().addDocumentListener(new DocumentListener() {
    @Override
    public void insertUpdate(DocumentEvent e) {
      refilterList();
    }
    @Override
    public void removeUpdate(DocumentEvent e) {
      refilterList();
    }
    @Override
    public void changedUpdate(DocumentEvent e) {
      refilterList();
    }
  });
  // This will allow the textfield to receive TAB keys
  jTxtItem.setFocusTraversalKeysEnabled(false);
  this.target = target;
  SwingUtils.addEscapeListener(this);
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Sets up the GUI after initializing the members.
 */
@Override
protected void initGUI() {
 super.initGUI();
 setLayout(new BorderLayout());
 m_OutputArea = new JTextPane();
 m_OutputArea.setEditable(false);
 m_OutputArea.setFont(new Font("Monospaced", Font.PLAIN, 12));
 add(new JScrollPane(m_OutputArea), "Center");
 m_Input = new JTextField();
 m_Input.setFont(new Font("Monospaced", Font.PLAIN, 12));
 m_Input.addActionListener(this);
 m_Input.setFocusTraversalKeysEnabled(false);
 m_Input.addKeyListener(new KeyAdapter() {
  @Override
  public void keyPressed(KeyEvent e) {
   doHistory(e);
   doCommandlineCompletion(e);
  }
 });
 add(m_Input, "South");
}

代码示例来源:origin: Waikato/weka-trunk

/**
 * Sets up the GUI after initializing the members.
 */
@Override
protected void initGUI() {
 super.initGUI();
 setLayout(new BorderLayout());
 m_OutputArea = new JTextPane();
 m_OutputArea.setEditable(false);
 m_OutputArea.setFont(new Font("Monospaced", Font.PLAIN, 12));
 add(new JScrollPane(m_OutputArea), "Center");
 m_Input = new JTextField();
 m_Input.setFont(new Font("Monospaced", Font.PLAIN, 12));
 m_Input.addActionListener(this);
 m_Input.setFocusTraversalKeysEnabled(false);
 m_Input.addKeyListener(new KeyAdapter() {
  @Override
  public void keyPressed(KeyEvent e) {
   doHistory(e);
   doCommandlineCompletion(e);
  }
 });
 add(m_Input, "South");
}

代码示例来源:origin: de.sciss/jsyntaxpane

jTxtItem.setFocusTraversalKeysEnabled(false);

代码示例来源:origin: de.sciss/syntaxpane

jTxtItem.setFocusTraversalKeysEnabled(false);

代码示例来源:origin: MegaMek/megamek

modifiers.setFocusTraversalKeysEnabled(false);
key.setFocusTraversalKeysEnabled(false);
repeatable.setFocusTraversalKeysEnabled(false);

代码示例来源:origin: vasl-developers/vasl

m_edtInputText.setFocusTraversalKeysEnabled(false);
m_edtInputText.addActionListener(new ActionListener()

代码示例来源:origin: com.synaptix/SynaptixWidget

nameDocumentListener = new NameDocumentListener();
nameField.getDocument().addDocumentListener(nameDocumentListener);
nameField.setFocusTraversalKeysEnabled(false);
nameField.addKeyListener(new KeyAdapter() {
  @Override

相关文章

JTextField类方法