• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

When click on minimize button then it must goes to System Tray?

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When anyone click on minimize or close button of window then it will go to Taskbar Status Area.
And when we click on close button then window will close but application don't close means it show icon in Taskbar Status Area.
Like as gtalk.when we click on close button of gtalk window then window goes to system tray .And gtalk application runs always.
How can it possible?
please some idea to write java code for this type of application.....
I am using window OS.
 
Sheriff
Posts: 22815
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) Use JDK 1.6; that gives you java.awt.SystemTray and java.awt.TrayIcon
2) Set the default close operation to DO_NOTHING_ON_CLOSE
3) Add a WindowListener to your frame; use getExtendedState and setExtendedState. For instance, to minimize and restore use the following code:
Moving to Swing / AWT.
 
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic