JAVA + System Tray + Without dos

please go here
http://forum.java.sun.com/thread.jsp?forum=57&thread=540599&tstart=0&trange=15
dukes dollar will be awarded

DOLLARS HAVE BEEN INCREASED

Similar Messages

  • Java System Tray Menu

    Hi,
    I am able to use a png icon in my system tray element. ( TrayIcon trayIcon =new TrayIcon(createImage("/images/e-vision3.png", "tray icon"));) . Now i need to add icons to some MenuItems. ie, Both menu name and an icon. I had tried a lot to make this working but failed. Please help me on this issue.
    Thankyou.
    Sreejith P.M.

    Hi,
    Thank you for your answer,
    I am not using JMenuItem. in my application i had used awt MenuItem. (ie, used MenuItem aboutItem = new MenuItem("About"); not JMenuItem aboutItem = new JMenuItem("About"); ) We can add trat icon to system tray. when mouse right click the menu and menu items will show. I need to add some icons in the pop up menu items. Can i do this?
    Thankyou,
    Sreejith
    Edited by: user13423634 on Dec 29, 2010 10:34 PM

  • Java System Tray Menu- pop up on left click.

    Hi,
    The system tray menu will normally pop up on mouse right click. I need to make this pop up on mouse left click. Is it possible? I had tried a lot and failed to find a solution. Please help me on this issue.
    Thank You.

    Hi,
    Thank you for your answer,
    I had tried a lot to make pop up the system tray menu on mouse left click. Finally i got a way to do this. My code is,
    MouseListener ml;
            ml = new MouseListener() {
                public void mouseClicked(MouseEvent e) {
                    if (mouseflag == 0) {
                        try {
                            Robot robot = new Robot();
                            // RIGHT CLICK
                            robot.mousePress(InputEvent.BUTTON3_MASK);
                            robot.mouseRelease(InputEvent.BUTTON3_MASK);
                        } catch (Exception exe) {
                            System.out.println("error=" + exe);
                        mouseflag = 1;
                    } else {
                        mouseflag = 0;
            public void mouseEntered(MouseEvent e) {
              System.out.println("Tray icon: Mouse entered");
            public void mouseExited(MouseEvent e) {
              System.out.println("Tray icon: Mouse exited");
            public void mousePressed(MouseEvent e) {
              System.out.println("Tray icon: Mouse pressed");
            public void mouseReleased(MouseEvent e) {
              System.out.println("Tray icon: Mouse released");
          };here i had created a mouse right click using code (robot class) on mouse clicked. Now i can pop up menu on left click. But now my issue is, i am not able to remove right click functionality. I think this is in built function for system tray menu. please help or give suggestions on this issue. I think that the way which i used to pop up menu on left click is not a good one. If i removed right click then this code may not work.
    Thank you,
    Sreejith P.M.
    Edited by: Sreeksd on Jan 6, 2011 11:39 PM

  • Run program in system tray.

    Hi guys. how do i run my JFrame application in the system tray without using native code?

    You can use the JTray API (Java System Tray API For Windows) that can be found at http://www.JavaAPIs.com. It supports several image types, animation, and display of AWT and Swing Components as pop-ups.

  • Hide all opened jframes / Minimize to system tray

    can u all help me by telling
    either
    1) how to minimize an application and send it to the system tray without showing on the task bar
    or
    2) how to show / hide all the JFrame that are currently opened

    What you seek to achieve is simple if you use the features provided in JDK 6. You need to call the setExtendedState( ) method on your JFrame using the MINIMIZE option and then call setVisible(false) on the frame to remove it from the taskbar.
    The next step is to use the SystemTray, TrayIcon, PopupMenu classes found the java.awt.* package to create your own SystemTray Icon and show this in the system tray. This not very hard to do. So upgrade your JDK to version 6 if you already haven't and take a wack at it. Post back here if you have any problems
    Note: you can enclose all this activity in a WindowListener to make it automated.
    ICE

  • Minimize licq to system tray

    i know for shure that you can minimze licq to the system tray without having a taskbarentry - but i can't figure out how !?!

    licq compiled without --with-kde
    But it can be minimized, though.
    I don't know exact english option names, but try
    Licq -> settings -> (in bottom right corner) icons -> set first check (use icons) and last radio (small icons) buttons
    Also, you can download PKGBUILD for "licq-be" package or try this PKGBUILD:
    ########################3
    pkgname=licq-kde-gui
    pkgver=1.3.4
    pkgrel=1
    pkgdesc="KDE user interface plugin for Licq"
    arch=(i686)
    url="http://www.licq.org"
    depends=('licq')
    source=(http://heanet.dl.sourceforge.net/sourceforge/licq/licq-$pkgver.tar.bz2)
    md5sums=('3bab0c9d1977f9b14421d36110e17e0c')
    build() {
      cd $startdir/src/licq-$pkgver
      # KDE-gui is a variant of Qt-gui
      cd plugins/qt-gui
      ./configure --prefix=/usr --with-kde
      make || return 1
      cd po
      lrelease *.ts || return 1
      cd -
      make DESTDIR=$startdir/pkg install
      find $startdir/pkg -name "*.la" -exec rm -f {} ;
      rm -rf $startdir/pkg/usr/share
    then do "makepkg" and install package
    then exit from licq and edit ~/.licq/licq.conf - replace "qt-gui" on "kde-gui" (you cannot just change it from licq gui because you need to unload this gui first)

  • How to add program to windows system tray?

    I heard from someone that in order to add a program to the system tray, I must use JNI. I want to ask whether there is any other alternative. If not, how do I go about doing it using JNI.
    Thanx in advance.

    You can use the JTray API (Java System Tray API For
    Windows) that can be found at http://www.JavaAPIs.com.
    It supports several image types, animation, and
    display of AWT and Swing Components as pop-ups. I always find it rather annoying when people scour past posts to promote a product that they have a vested interest in.
    Especially when they don't point out that that they have such an interest.
    Especially when they don't point out that the interest is monetary.
    Especially when they do nothing but post ads - never actually answering a single question.
    Just me I suppose.

  • Iconizing to System tray

    Can somebody please tell me how I can iconize and send to system tray my Swing Application?

    You can use the JTray API (Java System Tray API For Windows) that can be found at http://www.JavaAPIs.com. It supports several image types, animation, and display of AWT and Swing Components as pop-ups.

  • Getting System tray icons in Java

    I have developed a swing application and want to control the number of instances running of my own Java class. Is there a simple way how I can do the task?
    Also, i am putting my application in the System tray so, can i get a list of icon for all applications in the system tray? (may be i can control multiple instance using this simple technique)

    sandeep_khurana wrote:
    kevinaworkman wrote:
    Didn't you even look at the API?
    http://java.sun.com/javase/6/docs/api/java/awt/SystemTray.html
    actually the problem is that it is giving null because the api says that it will give the details for the icons by
    'this' application. what i want is all the icons, then, i will decide whether to launch or exit in the succeeding instances of my class.Are you saying that you want to see all of the "icons" in the system tray so that you can iterate over them to see if your icon is one of them and - if it is - not launch your application?
    You're not going to want to do it that way. The "how do I ensure that my program launches only once" problem has been discussed on these forums many times.
    Some options include:
    bind a socket to a not-often-used-port such as 9999 or 9998 or something like that. Two sockets cannot bind to the same port, so that would let you know that you're already running.
    Check for the existence of a file. When you launch your application, if the file exists, it's already running. Delete the file when your program terminates. This technique is pretty common on *NIX systems.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • System tray functionality in java

    Hi friends,
    I wanted to know which is the best package to use for implementing the system tray functionality in java.
    I read about systray, jtray,trayicon etc. I saw that TrayIcon is included in jdk 1.6. Is there any other included package in swing which will do this?
    i am just a beginner in swing programming.
    Thanks in advance.

    i would say not. as far as i can remember you can't directly set icons on a AWT MenuItem.
    and you shouldn't mix awt and swing components and most of the time can't do it anyway.
    however, if you have your own MenuItem i recon you could overwrite paint and paint the icons,
    i.e. images yourself using graphics2D methods.
    if you want to dig deeper into it, there are some good tutorials on paint:
    [http://java.sun.com/products/jfc/tsc/articles/painting/]
    might be worth, if you really want to have images and icons on your menuitems.
    i have never done this myself for awt components, but it should work.
    just found something interesting though:
    [http://atunes.svn.sourceforge.net/viewvc/atunes/aTunes_HEAD/src/net/sourceforge/atunes/gui/views/controls/JTrayIcon.java?view=markup]
    apparently, using this class, which derives from the normal TrayIcon, you can set a JPopupMenu and therefore use normal swing components.
    i did not try it though, but it looks very promising.
    Edited by: produggt on 20.08.2008 22:08

  • Attaching window system tray icon events to java frame

    I need to bring java frame to front on an event with the icon placed in the system tray. Like if I click the mouse on it.. the frame should come to front.
    Any body who can help, I will really appreciate.
    Thanks in advance
    Zeeshan

    I am very interested in implementing just such a thing with my Java application. I am in the starting phases of this project and ran across your post in my search for info.
    How much do you already have implemented? I.E., can you display the icon but are just having trouble catching the events for when the icon is clicked? Or do you not even have the ability to display the icon yet? I have found the Windows documentation on the MSDN site for the shell function Shell_NotifyIcon(), which is what we want to use but I have not begun any attempts to use it yet.
    If you (or anyone else) have any info or have had any success at all with this yet, I would be very interested in hearing how it works. I'll be happy to share any info I find, when/if I get that far.
    Thanks,
    j

  • How to put Java application in the MS. Windows System tray

    dear all,
    Is it possible to make a Java application communicate with the MS. Explorer and to put a Java application in the MS. Windows System tray
    Regards

    http://www.esus.com/docs/GetQuestionPage.jsp?uid=624
    or look for madcap on sourceforge

  • Move Java Frame into Windows taskbar notification area (system tray)?

    Hi,
    I was wondering if anyone has written a service-like application in Java running (and appearing) in the Windows "taskbar notification area", instead of running in the convential Windows taskbar.
    I'm able to add an icon to the taskbar notification area (frequently errorneous called as the 'system tray') by using some native code that uses win32 Shell_NotifyIcon(.. , ..). However, I'm not able to 'couple' the window (i.e. the Java frame) to the new icon in the taskbar.
    My icon is shown in the area AND the frame is shown as an application in the taskbar... I would like to 'remove' my Java application from the taskbar and place it 'as an icon' in the taskbar notification area.
    Has anyone had experience with a similar problem?
    Many thanks!
    Jasper

    If all you need is to make the frame not visible in the taskbar as well than why don't you activate the hide() method? cature the minimize event and activate the frame.hide(); method. And in the system tray make the frame visible by frame.show();

  • How to minimize ie to system tray using java

    click ie minimize button and show an icon in system tray area not in task bar
    and then click the icon to restore the ie window.
    help me about this,thank you very much!

    Use JNI.
    I have seen the code posted on this forum before on how to do this, I think by me. Also the example on using JNI ("99% Java" article) does this.
    So STFF.

  • Starting sap-system from MS-DOS without SAP Management Console?

    Hi,
    I want to start the sap-system from MS-DOS without using SAP Management Console.
    Is this possible?
    Which file must be started?
    Thanks for your help.
    Regards
    Stefan

    Hi Stefan!
    Try this:
    startsap name=<SID> nr=<InstNo> SAPDIAHOST=<host>
    Regards,
    Carsten

Maybe you are looking for

  • PDF report Page Size

    I am using BI publisher in APEX to generate PDF report. Data is displayed only on paper size 8.5 X 11 regardless any paper size I select i.e. Letter 8.5x11, Legal 8.5x14, Tabloid 11x17, Custom 8.5x20.

  • Fixing text size so it doesn't mess with layout?

    In IE7, if the text size is set on anything but "smallest", some things go to two lines. For example, if you go to www.earthenexposure.com , I'd like to keep everything from "sculptures" to "about" on one line. The same can be said with the navigatio

  • Storage space full

    What is taking up all of the "other" storage space on my macbook air and how do I get rid of it?

  • Disabled Features

    I am trying to install a new printer that I bought last year (because it matches the 3 other printeres I have). I just recently tried to download the drivers from the disk that came with the printer. I realize that the drivers needed to be updated, s

  • What does an unexpected error occurred (error code -6584) when opening time machine

    After a terminal hard drive fail in my 2007 imac which was backed up to time machine I tried to restore some data onto my replacement imac 2.9 late 2012. I did this via migration assistant - it was a long process about 4 hours - so I went to bed and