Performing an action when an JMenuItem is clicked?

前端 未结 5 1690
挽巷
挽巷 2021-01-23 02:17

So i have made a simple program with a basic menu at the top of the frame, Now i just need to put actions behind each JMenuItem. Im struggling to work the code out though, Here

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-23 02:28

    Give an instance of Action (extend from AbstractAction) to JMenuItem

提交回复
热议问题