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
  • 108,320
  • 17
  • 126
  • 296
Archimedes Trajano
  • 22,850
  • 10
  • 113
  • 154

1 Answers1

3

because I don't actually have a parent component.

there are two ways for SystemTray

Community
  • 1
  • 1
mKorbel
  • 108,320
  • 17
  • 126
  • 296