Example usage for javax.swing AbstractButton getMnemonic

List of usage examples for javax.swing AbstractButton getMnemonic

Introduction

In this page you can find the example usage for javax.swing AbstractButton getMnemonic.

Prototype

public int getMnemonic() 

Source Link

Document

Returns the keyboard mnemonic from the current model.

Usage

From source file:Main.java

public static void main(String[] args) {
    AbstractButton jb = new JButton("Press Me");
    System.out.println(jb.getMnemonic());

    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(jb);//from  w  w  w . jav  a2s  .  c o  m
    f.pack();
    f.setVisible(true);
}