CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2005
    Posts
    42

    System Tray Icon

    Hi can i get a java program to only be vissible in the system tray icon bar?

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: System Tray Icon

    This is not really Java's responsibility. Java is 'platform neutral', it doesn't support any particular operating system, so it doesn't deal with such things - not all OS's have system tray icon bars...

    Either use a script or batch for the system you have in mind, that puts the Java application into the system tray icon bar (sounds like Windows?) - via a shortcut, or whatever, or (and I wouldn't recommend this option, except as an exercise) use the Java Native Interface (JNI) to write a DLL that your Java app can call to do the OS specific munging to put it wherever you want it.

    We could do that, but it would be wrong...
    Richard Nixon
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  3. #3
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104

    Re: System Tray Icon

    it's been done before, but it's a windows only thing. you should put code in your app to check that it isnt going to break on sytems that dont have a tray (i.e. not Microsoft). dont rely on the tray icon. have a look for an already-written module that will put the icon you require
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

  4. #4
    Join Date
    May 2004
    Posts
    45

    Re: System Tray Icon

    Quote Originally Posted by ZwOOp
    Hi can i get a java program to only be vissible in the system tray icon bar?
    Try JDIC ( https://jdic.dev.java.net/ ). It has an implementation of tray icons in Java.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured