• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Bring first frame to TOP

 
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I launch my java application, I open a frame that has no parent. If i don't click any other windows(not related to my app) on my pc, the frame is displayed. But if I happen to click on any other window or application before the frame shows, the frame opens but it is hidden behind the other windows. How can I force my frame to come on top of all applications once it is launched?
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try using the toFront() method of the frame. However, there is always a timing issue involved. Even if you use that method and are clicking on other things while waiting for that window to open, It could bring it to the front, and then you click on something without realizing that it had already shown.
Anyway, toFront() is the method to use though.
reply
    Bookmark Topic Watch Topic
  • New Topic