• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Focus problems...

 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about using
frame.requestFocus();
Ashwin.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic