Closed ctoabidmaqbool closed 1 year ago
I I use something like this codding, All is working fine
`
final PopupMenu popup = new PopupMenu();
TrayIcon trayIcon = new TrayIcon(Toolkit.getDefaultToolkit().createImage(getClass().getResource(ICON))); trayIcon.setPopupMenu(popup);
final SystemTray tray = SystemTray.getSystemTray();
try { tray.add(trayIcon); } catch (AWTException e) { System.out.println("TrayIcon could not be added." + e.getMessage()); }
MenuItem mnuSoftVersionStatus = new MenuItem(SOFT_VERSION); popup.add(mnuSoftVersionStatus);
mnuSoftVersionStatus.setLabel(SOFT_VERSION + " : " + "Starting"); new org.hsqldb.Server().start(); mnuSoftVersionStatus.setLabel(SOFT_VERSION + " : " + "Running");
I didn't originally intend for the label text to be changed after the MenuItem was added. I will look into implementing a listener to update this on the Event Dispatch thread when attributes of the MenuItems are changed. Thanks for opening this issue!
@ctoabidmaqbool I believe I've fixed this with commit 992c9b0. Could you please try your original code again with a copy of the source code before I push another release with the fix. I've written a test class and it appears to work on my end.
@dustinkredmond Hi! I have tried source files, and it's actually works as expected. Thanks
I have some other issues too, will put as separate issues.
Glad that fixed it! I will close this issue, review the others, then plan on a minor version release by the end of the week to resolve these.
For example, I am using this code:
After this
new org.hsqldb.Server().start();
themnuSoftVersionStatus.setText()
is not working?