This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes minimize to system tray on Win NT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "minimize to system tray on Win NT" Watch "minimize to system tray on Win NT" New topic
Author

minimize to system tray on Win NT

Laudney Ren
Ranch Hand

Joined: Jan 06, 2002
Posts: 111
How can I make my Java GUI minimized to the system tray and when the user clicks the icon on the system tray, he can config the program??


" Veni, vidi, vici "<br />" I came, I saw, I conquered "
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

There's no built in way to do this in Java, since the Windows System Tray is a Windows only kind of thing and Java is built to run cross-platform... The only way you can do this is JNI ( or a third party library that uses it )... and this means that you lose the ability to run your program on other platforms.

-Nate


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

Joined: Jan 06, 2002
Posts: 111
Thanks for your reply.
Then there are two ways I can deal with the problem:
1) Use VC++ to write the method used in minimize actionListner.
2) Use Java to create a flowing icon on the desktop.
Can you tell me what APIs can be used for the second purpose?
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

I don't know what a flowing icon is... But here's a page that provides a ready-made library of windows functions accessed through JNI... so you don't have to write it yourself...

-Nate
[ January 18, 2002: Message edited by: Nathan Pruett ]
Laudney Ren
Ranch Hand

Joined: Jan 06, 2002
Posts: 111
Nathan, thanks for your attention and invaluable URL.
BTW, after how many posts can I become a bartender?
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

2,312,945







But really, ranch hand is the only post related title... bartenders and sherriffs are forum moderators. Bartenders can only moderate (i.e. move posts to appropriate formums, delete inappropriate posts, etc.) in their specific forum, while sherriffs can moderate any forum. New bartenders and sherriffs are nominated and voted on by existing bartenders and sherriffs. Most of the attributes that go into choosing new moderators are number of posts, general helpfulness, and knowledge of Java.

-Nate
 
Consider Paul's rocket mass heater.
 
subject: minimize to system tray on Win NT
 
Similar Threads
how to get tomcat back in system tray
replacing objects in diff sized monitors
Where is the Plugin Console?
Minimising to System tray.
Server crash!