• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Event dispatch

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a window that I want to keep in the back at all times behind all windows. It should ignore mouse clicks, or not ever get to be the front. infact the whole program should be in the background at all times.

how would i go about this?
i have tried adding a mouselistener with mouseClicked( MouseEvent e ) { JFrame.toBack(); }
but thats already too late... because then the window comes to the front and covers all running applications windows before it is sent back and its not what I want.

I think I want to somehow stop the EventDispatcher to not dispatch the event at all... but I need help.
 
Alex Wolf
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
like.... HHHEEEELLLLPPP

please...

tried implements AWTEventListener but eventDispatched never gets called...
 
author and iconoclast
Posts: 24203
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If by "behind all windows" you mean behind all other applications, there's unfortunately nothing you can do in 100% Java. Events that bring applications to the front -- as opposed to moving individual windows within a single application -- are handled by the OS window system, not by the application.

Some OSs may have an API call that means "show this application on the desktop, but only show it in the very back", but there's no way to do that from Java itself.
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This doesn't sound like a beginner question. In case that you need more help beyond Ernest's comments above, or if you have another similar question, you may want to visit the GUI forum where these kinds of issues are discussed. This particular forum discusses very general Java topics, so I think you will find more help there.

Keep Coding!

Layne
 
Alex Wolf
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
gotcha. thanks for the info both of you.
 
reply
    Bookmark Topic Watch Topic
  • New Topic