List of usage examples for javax.swing AbstractButton getDisplayedMnemonicIndex
public int getDisplayedMnemonicIndex()
From source file:Main.java
public static void main(String[] args) { AbstractButton jb = new JToggleButton("Press Me"); System.out.println(jb.getDisplayedMnemonicIndex()); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(jb);/* w w w. jav a2s .c om*/ f.pack(); f.setVisible(true); }