Hello. I'm using a JOptionPane to display some application information when the user selects the Help-About menu option.

If the about option has been selected and you click on an alternative application (e.g. a browser) when you return to the application the JOptionPane is lost and the application can't continue. You basically have to shut it down.

Any suggestions how i can keep the JOptionPane visible over the application?

Recommended Answers

All 3 Replies

Wow I've never noticed that before. The JOptionPane doesn't really disappear. It's there, just not on the Task Bar, so you'd have to use <Alt> + <Tab> and you'll be able to switch to it.

These one more thing to do with the display.. I just can't seem to remember it. Perhaps it doesn't really matter in your case, though if you are experience some weird behaviour with your JPanel, post again...

Peace

Alt-tab works but i'd like for the jOptionPane to display without any effort so the user doesn't think the app has crashed.

Problem solved!

I just used the JOptionPane setRootFrame(Frame newRootFrame) method, which seems to have anchored it to the main application window.

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.