aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Focus problems... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Focus problems..." Watch "Focus problems..." New topic
Author

Focus problems...

Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Hello,

I am working with multiple JFrames on a Solaris platform...

I am trying to make it possible for the user to fill out some info on one JFrame, and when a button is pushed on that JFrame, to bring another JFrame to the top... I can use the toFront() method of Window, but the JFrame that comes to the front does not have focus, and should... toFront() works under the windows platform fine (i.e. the window comes to the front and has the focus), but on Solaris the window comes to the front, but the one in the back ( the one that the button is on ) still has the focus.

Does anyone know how to make the window that has been brought to the top have focus?

-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Ashwin Desai
Ranch Hand

Joined: Jul 17, 2000
Posts: 124
How about using
frame.requestFocus();
Ashwin.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Nope... strangely, this does not work... ( but only on the Solaris CDE platform... ) I really assume that it is the actual requestFocus() call that toTop() makes that is not working... since the frame actually does come to the top... it just doesn't recieve focus... components inside the frames can requestFocus() and it works, but the frames themselves cannot...

-Nate
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Focus problems...