• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Java program running on task bar

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I've developed a swing application but would like to have it running with an icon on the task bar much like yahoo or msn messenger. If the user right clicks on the taskbar icon, a menu comes out. Does anyone have a tutorial or example of how this is done. THanks.
 
Ranch Hand
Posts: 1970
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need native code for this. I did it by writing a Windows C++ program that does the necessary taskbar setup stuff then invokes Java via the Java Invocation Interface.

The right-click menu on the taskbar also requires native code. The native code can call into the already-running Java program, via Java Native Interface (JNI).

Google for examples.
 
igwe kalu kalu ogba
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, i'll do just that.
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's far easier and more portable to use JDIC - https://jdic.dev.java.net/
 
igwe kalu kalu ogba
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow, where did that come from? Thanks a lot.
 
igwe kalu kalu ogba
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
William can jdic allow me to display msn messenger type alerts that come up from the system tray?
 
William A White
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, it's pretty flexible. I haven't used it for much beyond simple menus, but I believe that it's just a generic GUI component and you can pretty much display whatever you want in there. I have a couple small applications that do things like display different graphics in the pop-up depending on the state of other programs, and I have had it pop up by itself when a condition is met.

I don't think you can control things like the speed of the windows appearance, and it probably has to be contained in a rectangle.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic