📅  最后修改于: 2022-03-11 14:52:48.363000             🧑  作者: Mango
JMenuItem menuItem = new JMenuItem(new AbstractAction("My Menu Item") {
public void actionPerformed(ActionEvent e) {
// Button pressed logic goes here
}
});