0

Java since 1.6 allows the creation of TrayIcon http://docs.oracle.com/javase/8/docs/api/java/awt/SystemTray.html

What I am trying to do is create a simple app, that just shows dialogs, but because I don't have an actual main application, I don't see anything on the task bar when I do

jfilechooser.showOpenDialog(null);
JOptionPane.showOptionDialog(null, ...
JOptionPane.showMessageDialog(null, ...

because I don't actually have a parent component.

What I wanted to do was make a tray icon to represent the parent component without too much hassle to bring up the dialogs when I click on it, but TrayIcon does not implement Component.

mKorbel
  • 109,525
  • 20
  • 134
  • 319
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265

1 Answers1

3

because I don't actually have a parent component.

there are two ways for SystemTray

Community
  • 1
  • 1
mKorbel
  • 109,525
  • 20
  • 134
  • 319