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

minimize to system tray on Win NT

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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??
 
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
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
 
Laudney Ren
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
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
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
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nathan, thanks for your attention and invaluable URL.
BTW, after how many posts can I become a bartender?
 
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
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
 
If you live in a cold climate and on the grid, incandescent light can use less energy than LED. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic