I have created a JMenuItem and a JButton.
How can I have the same result when I use either the JMenuItem or the JButton?
Basically I want them to trigger the same method.
Thank you.
skiabox
0
Light Poster
Recommended Answers
Jump to PostThe Action mechanism was created for exactly this purpose:
http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html
All 3 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
skiabox
0
Light Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.