Results 1 to 6 of 6
  1. #1
    nando88 is offline Member
    Join Date
    Aug 2013
    Posts
    28
    Rep Power
    0

    Default Background application

    I have a java application that has a GUI, and I want it to keep running in the background after the window has been closed.
    I will install this applicaton in windows and I already know how to make it an exe, but I still don't know how to leave my application in the taskbar,after the window has been closed.
    I already have an icon that appears in the taskbar, but every time I close the window, the application closes conpletely. How can I make this application run in the background after the window has been closed, and the icon should remain in the taskbar?
    Thanks in advance!
    I used this code to make an icon appear in the taskbar:
    How to Use the System Tray (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Other Swing Features)

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,655
    Rep Power
    5

    Default Re: Background application

    Probably your simply need to set the proper default close operation of your JFrame.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,864
    Rep Power
    8

    Default Re: Background application

    If you want help, you'll have to post an SSCCE that demonstrates exactly what you're doing- not a snippet, but not your whole project either.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  4. #4
    nando88 is offline Member
    Join Date
    Aug 2013
    Posts
    28
    Rep Power
    0

    Default Re: Background application

    what would I need to do in order for the application gui to show when the icon is double clicked?
    Thanks in advance!

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,655
    Rep Power
    5

    Default Re: Background application

    You google "java system tray popup double click".
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  6. #6
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,864
    Rep Power
    8

    Default Re: Background application

    Quote Originally Posted by nando88 View Post
    what would I need to do in order for the application gui to show when the icon is double clicked?
    Thanks in advance!
    Like I said, post an SSCCE and a specific technical question, and we'll be happy to help.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Replies: 0
    Last Post: 04-08-2013, 09:48 PM
  2. Doing background task in Swing application
    By Heatryn in forum Advanced Java
    Replies: 2
    Last Post: 07-05-2012, 01:27 AM
  3. Replies: 7
    Last Post: 09-08-2010, 10:50 AM
  4. Replies: 3
    Last Post: 12-04-2009, 12:10 PM
  5. Replies: 1
    Last Post: 08-05-2009, 02:43 AM

Posting Permissions

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