actionPerformed(null)

?

-

i have an ExitAction which is added into a JMenu.
i want to use the same logic of it for windowClosing.
so i simply call exitAction.actionPerformed(null).

is such a call ugly or is it better to have an exit() method and have
the ExitAction's actionPerformed and JFrame's windowClosing call it?

thank you in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top