|
|
Re: Focus issues??
|
Posted: Sep 15, 2005 11:40 PM
|
|
> I still don't understand what's the problem. > > The JPotionPane is modal wich means that the window > containing the parentComponent can't get the focus back as > long as the Dialog is visible. I am aware that a JOptionPane is modal but for some reason it happens less frequently than often, the parentComponent ends up having focus, and you have to Alt+Tab to get the OptionPane back. I don't want to skim through 20,000 lines of code and possibly break the system so I was looking for a quick fix.
> But if you really wan't to be sure, use this line to get > the focus backthis.requestFocus()
That won't work, I was looking for more of a hack which is why I posted this question. > Forget that Alt+Tab crap, that's Windows legacy and would > never work to 100% since you can never be sure wich Window > will get the focus this way. >
I'm actually behind a Mandrake (Linux) box, so which also executes the same OS command. I wanted to actually execute this via Java's Runtime exec method. And call mandrakes function (possibly this can be written in native such as C and have Java call it (but that sounds too complex to me).
Thanks for the suggestions though.
Spike
|
|