click a menubar java code example
Example: java swing menu click event
JMenuItem menuItem = new JMenuItem(new AbstractAction("My Menu Item") {
public void actionPerformed(ActionEvent e) {
// Button pressed logic goes here
}
});
JMenuItem menuItem = new JMenuItem(new AbstractAction("My Menu Item") {
public void actionPerformed(ActionEvent e) {
// Button pressed logic goes here
}
});