Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.awt.event.KeyEvent;

import javax.swing.JButton;
import javax.swing.JOptionPane;

public class Main {
    public static void main(final String args[]) {
        JButton button = new JButton("Text Button");
        button.setMnemonic(KeyEvent.VK_B);

        JOptionPane.showMessageDialog(null, button);
    }
}