I have two jbutton in a jpanel and when you click the first button you see a msg box saying "good morning" and when you click the second you see a "good night" msg box . But when i click on the first button and not closing the msg box first i can not click the second button to see the message.
Can anyone help me?
thanks.
This would suggest two basic things, you are using either a JOptionPane
or modal JDialog
to display your messages.
In either case, a modal dialog blocks the parent window until it is dismissed. You need to make the dialog modeless instead.
Take a look at How to Make Dialogs