This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Focus problems...

 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ashwin Desai
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about using
frame.requestFocus();
Ashwin.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic