List of usage examples for javax.swing JButton getFocusTraversalKeys
public Set<AWTKeyStroke> getFocusTraversalKeys(int id)
From source file:Main.java
public static void main(String[] argv) throws Exception { JButton component = new JButton("a"); Set set = new HashSet(component.getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS)); set.add(KeyStroke.getKeyStroke("F2")); component.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, set); }
From source file:Main.java
public static void main(String[] argv) throws Exception { JButton component = new JButton("a"); Set<AWTKeyStroke> set = new HashSet<AWTKeyStroke>( component.getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS)); set.add(KeyStroke.getKeyStroke("F2")); component.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, set); }