Forum Stats

  • 3,783,609 Users
  • 2,254,809 Discussions
  • 7,880,483 Comments

Discussions

Creating TaskBar Icon

843807
843807 Member Posts: 46,582
edited Feb 21, 2003 3:16PM in Java Desktop Applications
We have a Java application that runs from a CD-ROM and I am trying to create a TaskBar Icon or Desktop Icon to facilitate the user with easy access to turn on/off the application. Is there any ready-to-use plug-in in java or other program that I could use. Any help or information in this regard is appreciated.

Thanks.


Comments

  • 843807
    843807 Member Posts: 46,582
    You won't be able to do this within Java because different operating systems have different ways of identifying the CD-ROM.

    However, you should be able to create a shortcut in MS Windows which points to either the CD-ROM or to a batch file that launches the Java application. I think you can create a similar shortcut on MacOS and OS-X. In both cases, you will be able to pick an icon for it.

    In Linux and UNIX, writing a shell script to access the application is trivial. Picking an icon for it however would be incredibly difficult because of the wide range of window managers available - what shows up on the KDE taskbar won't necessarily show up on GNOME.

    The fundamental problem is different operating systems have different ways of checking to see if your application is in the CD-ROM drive. If it was on the computer hard drive OR you wanted the user to access the CD and then launch the application via its icon, you wouldn't have a problem.
  • 843807
    843807 Member Posts: 46,582

    For windows, you need to use windows shell function to do so. Also the response to mouse click on taskbar icon should be wrapped in windows program as well by mouse message or tracking Pop Menu.

    In one word, it is do-able, but it is not easy.

    If you want to further your rearch, try Windows programming and JNI technology.

    [email protected]
This discussion has been closed.