Hiding the GUI to system tray or background

I want to write an alarm scheduler GUI which will continuously run on the system, both Windows and Mac. Here are the tasks I need to accomplish:
1) When the user clicks on the close window or "X" sign, I simply want to minimize the gui to sys tray in case of Windows, or push it to background in case of Mac (somehow hide the GUI from the screen in both cases).
2) Another requirement is that if the user starts the program from desktop by clicking on an icon, the program should check to see if an instance of itself is already running, and if so, load the running instance. And what i mean by that is to bring the GUI back to screen. If the program is not already running, start a brand new instance of it.
Any help would be much appreciated.

Don't cross post , please!
Answered here: http://forum.java.sun.com/thread.jspa?threadID=5167315

Similar Messages

  • 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

  • How to run the exe in system tray?

    dear ni,
                    Interestingly i want to do something with labview with different task... now, after creating the exe is it possible to run on "system tray"
    when exe window close that will come to system tray.... how to do this?,..
    Regards,
    Balaji DP

    This Inventeering toolkit allows you to create a LabVIEW program that can access the Window's System Tray. Now you can make your LabVIEW program show up with your custom icon, pop up tool tip, and pop up menu in the system tray. Comes with a Royalty Free built application distribution license.
    Product Features:
    PROGRAMMABLE loading of icons, tool tips and menus to the system tray that will allow your program to poll for system tray events; and then respond in accordance to your design needs. An example LabVIEW Program demonstrating use is also provided.
    http://www.inventeering.com/_public/INVtray/INVtray.zip

  • Remove the icon in system tray

    Good afternoon,
    After playing around with bootcamp and Windows 7 I decided to delete the partition.  I still have the bootcamp icon in my system tray next to my airport and time machine icons.  How do I make it go away?   I'm sure it's not hurting anything, it just bothers me to be up there.  Yes, I may be a little OCD.    I tried to move and delete by holding down the command key and selecting it with the mouse but no luck.  Any idea?
    Thanks!
    Mike

    Quote
    Originally posted by pcy
    It's not annoying - it's correct.
    Also wrong. It's both.
    It shows up on my system too for the RAID. I've learned to live with it but I don't really like it there.

  • How Do I Remove Photo Downloader Icon from the notification area (system tray)

    Yes, this should be simple, but I'm baffled. Can the icon be permanently removed, or at least when when the Album Starter is not in use... other than clicking on "exit" which only brings it back when the computer is restarted without removing the program?

    From ; Terence ONeill - UK
    KILLING ADOBE PHOTO DOWNLOADER AND TRAY ICON.
    Easy ! I use Comodo Pro Firewall.
    1) Click on DEFENSE box.
    2) Click on "View Active Process List"
    3) Look down the list of processes. Find APDPROXY.EXE.
    4) Click it, then click "Terminate and Quarantine"
    5) ALL DONE ! No more icon in tray and the program is killed.
    APDPROXY - This is lurking about, you can find it on SEARCH from the START button. BUT, you cannot delete it or move it and MSCONFIG does not work. You can disable it as many times as you like - it will keep coming back.
    SOLUTION ! Download CCleaner, it is a great little program and free.
    Using this you can click on TOOLS, then STARTUP. A list of programs are shown which are enabled at STARTUP. Disabling does not work, just click on APDPROXY and click DELETE. It`s GONE !
    All over in a flash - no more ADOBE PHOTO DOWNLOADER.

  • What is the 'M' in system tray?

    The 'M' next to enable Wi-Fi?

    Hi!
    This "M" represents mobile data. You can tap it to enable mobile data from you Carrier if you have mobile data purchased.
    If you have any more questions regarding this, please do not hesitate to reply back.
    Thank you!

  • When Firefox is launched, my system tray is disabled(masked by some kind of gray mist), then I can only acitvate the date and time properties by double-click, any left click does not make sense. Did anybody encounter this situation?

    I can not activate the minimized window task manager, even when I end the procedure of taskmgr.exe, its minimized icon is still there in the gray masked system tray.

    I can not activate the minimized window task manager, even when I end the procedure of taskmgr.exe, its minimized icon is still there in the gray masked system tray.

  • Minimizing java GUI to sys tray

    I want to write an alarm scheduler GUI which will continuously run on the system, both Windows and Mac. Here are the tasks I need to accomplish:
    1) When the user clicks on the close window or "X" sign, I simply want to minimize the gui to sys tray in case of Windows, or push it to background in case of Mac (somehow hide the GUI from the screen in both cases).
    2) Another requirement is that if the user starts the program from desktop by clicking on an icon, the program should check to see if an instance of itself is already running, and if so, load the running instance. And what i mean by that is to bring the GUI back to screen. If the program is not already running, start a brand new instance of it.
    Any help would be much appreciated.

    Prometheus, appreciate the help. But using singleton pattern doesnt solve the problem. Here is my code for singleton and the test classes.
    package com.vetinsite.scheduler;
    public class Singleton {
        private static com.vetinsite.scheduler.Singleton uniqueInstance;
        private int var;
        private Singleton() {}
        public static synchronized Singleton getInstance(){
            if(uniqueInstance == null){
                 uniqueInstance = new Singleton();
            return uniqueInstance;
        public void setVar(int v){
            this.var = v;
        public void print(){
            System.out.println(var);
    package com.vetinsite.scheduler;
    public class Test1 {
        public static void main (String argv[]){
            com.vetinsite.scheduler.Singleton single = Singleton.getInstance();
            single.setVar(1);
            single.print();
            single.setVar(2);
            try{
                 Thread.sleep(10000);
            catch (Exception e){}
            single = Singleton.getInstance();
            single.print();
    package com.vetinsite.scheduler;
    public class Test2 {
        public static void main (String argv[]){
            com.vetinsite.scheduler.Singleton single = Singleton.getInstance();
            single.print();
    }I run Test1 which sets the singleton's "var" variable to 1 and then 2. Then sleeps for 10 second. Within the 10 sec period I run Test2 expecting it to print out "2", but it instead prints "0". I guess my understanding of singleton pattern is wrong, becoz I thought if two different classes in the same package tried to instantiate the singleton object, it would one create one instance. But in this test its obviously creating two.
    If I cant use singleton pattern, is there any other means by which I can reload the running instance of a GUI.

  • No system tray in tint2

    Hi !
    I just replaced pypanel by tint2 and I don't regret it, its a nice & tiny taskbar.
    But only one things isn't working: The system tray.
    I activated it via the tint2conf menu, but neither vlc or pidgin icon appears...
    The config-section
    # System Tray
    systray = 1
    systray_padding = 0 0 0
    systray_sort = left2right
    systray_background_id = 1
    systray_icon_size = 16
    systray_icon_asb = 70 0 0
    Anyone know something which can help ?
    Last edited by Spot (2011-02-06 14:25:19)

    I'm using the correct file, because _all_ besides the system tray is working fine.
    I don't have any idea why the systray doesnt show up... (the same is with the non-working lua-script)
    # Tint2 config file
    # Generated by tintwizard ([url]http://code.google.com/p/tintwizard/[/url])
    # For information on manually configuring tint2 see [url]http://code.google.com/p/tint2/wiki/Configure[/url]
    # Background definitions
    # ID 1
    rounded = 0
    border_width = 0
    background_color = #000000 0
    border_color = #FFFFFF 100
    # ID 2
    rounded = 0
    border_width = 2
    background_color = #123F72 0
    border_color = #123F72 100
    # ID 3
    rounded = 0
    border_width = 0
    background_color = #000000 0
    border_color = #FFFFFF 100
    # Panel
    panel_monitor = all
    panel_position = bottom center horizontal
    panel_size = 100% 25
    panel_margin = 0 0
    panel_padding = 0 0 0
    panel_dock = 0
    wm_menu = 0
    panel_layer = top
    panel_background_id = 0
    # Panel Autohide
    autohide = 0
    autohide_show_timeout = 0.3
    autohide_hide_timeout = 2
    autohide_height = 2
    strut_policy = follow_size
    # Taskbar
    taskbar_mode = single_desktop
    taskbar_padding = 0 0 5
    taskbar_background_id = 0
    taskbar_active_background_id = 0
    # Tasks
    urgent_nb_of_blink = 0
    task_icon = 1
    task_text = 1
    task_centered = 0
    task_maximum_size = 200 30
    task_padding = 4 4
    task_background_id = 1
    task_active_background_id = 2
    task_urgent_background_id = 1
    task_iconified_background_id = 1
    # Task Icons
    task_icon_asb = 70 0 0
    task_active_icon_asb = 100 0 0
    task_urgent_icon_asb = 100 0 0
    task_iconified_icon_asb = 70 0 0
    # Fonts
    task_font = Sans 10
    task_font_color = #FFFFFF 80
    task_active_font_color = #FFFFFF 80
    task_urgent_font_color = #FFFFFF 80
    task_iconified_font_color = #FFFFFF 80
    font_shadow = 0
    # System Tray
    systray = 1
    systray_padding = 0 0 0
    systray_sort = left2right
    systray_background_id = 1
    systray_icon_size = 0
    systray_icon_asb = 50 0 0
    # Clock
    time1_format = KW%W - %a %d.%m.%y - %H:%M
    time1_font = Sans 10
    clock_font_color = #FFFFFF 80
    clock_padding = 5 0
    clock_background_id = 0
    clock_lclick_command = thunar
    clock_rclick_command = terminal --hide-menubar
    # Tooltips
    tooltip = 0
    tooltip_padding = 2 2
    tooltip_show_timeout = 0.7
    tooltip_hide_timeout = 0.3
    tooltip_background_id = 1
    tooltip_font = sans 10
    tooltip_font_color = #000000 80
    # Mouse
    mouse_middle = close
    mouse_right = none
    mouse_scroll_up = toggle
    mouse_scroll_down = none
    # Battery
    battery = 0
    battery_low_status = 10
    battery_low_cmd = notify-send "battery low"
    battery_hide = 98
    bat1_font = sans 8
    bat2_font = sans 6
    battery_font_color = #FFFFFF 60
    battery_padding = 1 0
    battery_background_id = 0
    # End of config
    Last edited by Spot (2011-02-06 17:19:47)

  • Bootcamp Control Panel Gone (Windows 7 System Tray)

    After I installed Windows 7 64-bit using bootcamp, I had a system tray icon for the Bootcamp Control Panel. It recently disappeared and I can't get it to appear back. Without the control panel running properly, it looks like the volume keys, backlit keyboard, etc don't work anymore in Windows.
    I have tried the things I could find in these forums and through online searches but nothing has worked:
    1) Uninstall and then reinstall Bootcamp drivers and controll panel program using the OSX install DVD. I installed "Boot Camp Update for MacBook Pro (13-inch, Mid 2010) (Windows 64 bit)"
    2) Using msconfig to confirm Bootcamp was in the start up program list (it was already in the list so I unchecked it, rebooted, then checked it again, an rebooted)
    3) Running Bootcamp.exe in Windows Vista compatibility mode
    4) Checking my registry for the entry being there correctly (it was)
    5) Customising the "notification area icons" to make bootcamp have the "Show icon and notifications" behavior.
    None of these things worked. For additional information, I see that Bootcamp.exe is in the Windows task manager process list so it seems to be running.
    How anyone found a solution to get the control panel system tray working again?
    Thank you!

    Hi Flying High,
    Thanks for the response. The little gray square for the Boot Camp Manager has shown up in the notification area before (accessible through the little arrow on the right side of the screen), but the problem is that it doesn't show up anymore.
    I just tried uninstalling Boot Camp and all the drivers, and then reinstalling it again from the DVD and using the "Boot Camp Update for MacBook Pro (13-inch Mid 2010 (Windows 64 bit)"...
    The little gray square for the Boot Camp Manager showed up after the first reboot and the function keys worked (like volume control), but when I rebooted again, the notification manager didn't show up and none of the function keys work anymore. So back to square one.
    Has anyone had this problem with the Boot Camp Manager showing up in the notification ares only after the initial installation but not after reboots?
    Thank you!

  • Bootcamp Icon missing from system tray...

    On the 1st computer (iMac) that I installed BootCamp with Win 7, I have an icon in the lower left system tray for changing the booting choice.
    Today I installed BootCamp on my wife's new Mac Mini and the icon is missing from the system tray. While it was about 6 weeks ago that I put BootCamp on my iMac, I don't remember doing anything that cause the Windows system tray to display the boot choice icon for BootCamp/Win 7.
    Anyone have an idea about how I can get that icon to appear on the Mac Mini.
    Both systems are running Snow Leopard with the latest software.

    Macaby there are two separate components of Boot Camp. First is Assistant which runs on the Mac side of things from OS X. It creates/deletes the Windows partition which is necessary to install Windows. Next the Boot Camp Panel software which is installed once you have successfully installed and are running Windows. It allows tweaking of the Apple hardware from within Windows. It is installed using the OS X disc and does not jeopardize your installed Windows OS in any way. This disc also contains the hardware driver necessary to optimize the hardware in Windows. In my experience this disc has never started via autorun so you will most likely have to locate the Boot Camp folder and run the setup.exe file manually.
    Don't know how much your wife uses Windows but if it's running well enough then you may want to leave it alone. Check device manager in Windows for any red or yellow punctuation marks. This will indicate a potential driver issue in Windows. Also check the Windows Experience Index for performance issues. A 1 anywhere indicates a driver issue. If you have no driver issues and Windows is running well enough you may want to leave it at that.

  • System Tray icon missing sometimes

    I have an HP printer 4100 series, Gateway computer, Vista.
    I've had two times when I booted up and the HP Printer system tray icon was not in the system tray.
    I will look at the Notification Area setup and one of the icons listed (under Past Items) is "Terminating Digital Imaging Monitor."
    However, I was still able to print normally.  If I reboot, the system tray icon will return.
    I've had the same printer/setup for over a year.  This never happened till today.  Normally the system tray icon will appear at startup.
    It may be one of Vista's quirks - I sometimes notice inconstent things about the system tray icons.
    Anyone know why this might happen?

    I am on the same os and having the same issue. I tried reloading java and found it did not help.
    Please advise.

  • Hide system tray notification after login via RD web access

    Hi,
    I have a question. Is there a way to set that the notification in system tray won't appear after login into RD web access? And related question. I recently rename server and in this notification still shows old one. "Your computer is connect to: {old
    server name}" Is there way to change to at least the correct name of the server? I tried searching in registry but without luck. Thank you.

    Hi,
    Thank you for posting in Windows Server Forum.
    What’s your server OS Version? There is one KB related to the issue which you are facing. 
    The issue might occurs when there are multiple unexpired cookies on the client computer. To work around this issue you can use “Let me Fix by myself” from below article.
    The "Connected" icon does not appear in the notification area when you connect to a remote application by using Remote Desktop Web Access on a computer that is running Windows Server 2008 R2 
    http://support.microsoft.com/kb/977507
    In addition to change the name of RDS Server you can use following script.
    Change published FQDN for Server 2012 or 2012 R2 RDS Deployment
    http://gallery.technet.microsoft.com/Change-published-FQDN-for-2a029b80
    Hope it helps!
    Thanks.
    Dharmesh Solanki

  • How to add a minimize to system tray icon button?

    how can i add a minimize to system tray icon button near the others common buttons usually found on the upper right window bar? (i mean near the _ [] X)
    _ for minimize to taskbar
    [] for maximizing
    X for closing
    i'd like to add a fourth button to the left of the _ button for minimizing to system tray
    like in many programs the fourth button is a dot shaped one that minimizes the program to system tray
    i'd like to add one to my program as well, but i didnt find anything about this kind of buttons neither on google nor on java books
    can anyone help me?
    thank you!

    You can't (easily). The window decorations are controled by the operating system. Your best bet is to change the functionality of the minimize-to-taskbar button and make it into a minimize-to-tray button. In fact, all the programs that minimize to the tray on my computer - about 6 of them - do it this way.
    like in many programs the fourth button is a dot shaped one that minimizes the program to system trayI've never seen this?

  • System Tray CPU Temp Monitor Program

    Good afternoon all, as I'm getting more and more settled into my new system I'd like to keep a close eye on some temperatures as I increase clocks.
    I've gone through the downloads board and looked at a few of the mentioned utilities - one notable one that I recognized was Speedfan. I've used this in the past, and I have also used CPUTEMP - which was quite good.
    What I'm looking for is something I can easily monitor from my system tray. Ideally I'd also like to get another program to monitor my GPU temperatures and have that on the system tray too.
    TL;DR
    Are there any member favourite utilities out there that you'd recommend for monitoring your CPU temps (that possibly have the minimize to system tray feature)?
    How about some of your favourite utilities that do the same thing buy for your MSI GPU? (I could post this in another board - but maybe I can kill two birds here)
    Note: I'm looking for something lightweight that doesn't require a ton of configuration/setup.
    Thanks again guys - always appreciate the kind/helpful responses.

    The latest evolutions of command center work quite well and have a desktop app I believe like cpu temp. (Which is what I used when I was overclocking more)
    HW monitor is another goto app I have used many times in the past.

Maybe you are looking for