📜  java swing 菜单点击事件 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:48.363000             🧑  作者: Mango

代码示例1
JMenuItem menuItem = new JMenuItem(new AbstractAction("My Menu Item") {
    public void actionPerformed(ActionEvent e) {
        // Button pressed logic goes here
    }
});