Closed ctoabidmaqbool closed 1 year ago
It looks like the AWT API is requiring you to have set a label on the MenuItem before it is added to the TrayIcon. Please try setting a label on the MenuItem first before adding it to the TrayIcon.
@dustinkredmond Hum! I have already tried it, If MenuItem is assigned as empty string, then all works good. e.g.
MenuItem mnuBuizName = new MenuItem("");
But I think, it should also except empty parameter / null values because in AWT/SWING it's excepting it!
I've changed the AWTUtils
class with commit 1d11f3d to check if the text passed in the FX MenuItem
is null, if so, we'll call the AWT constructor with an empty String
. This should take care of your issue going forward.
I have used codding somethings like this:
Error: