Re: Tray Icon?

2020-08-01 Thread Michael Paus

My mistake. Sorry. I read the question a bit too fast :-).
Anyway, here is an example of how to use the AWT system tray
from within JavaFX. Maybe it helps: 
https://gist.github.com/jewelsea/e231e89e8d36ef4e5d8a

I just verified that this still works with Java 11+.
Otherwise I fully support the idea of getting this shortcoming fixed  in 
JavaFX itself.

Michael

Am 01.08.20 um 01:45 schrieb Scott Palmer:

I should also point out that this shortcoming was identified nearly 9 years ago.

https://bugs.openjdk.java.net/browse/JDK-8092115

I would love to make some progress on this, but I think doing it right is a 
bigger job than “outsiders” can tackle. Ideally most of the desktop APIs should 
be supported by JavaFX without AWT/Swing. I think that requires some careful 
thought. Some of the code should be independent of the UI toolkit and it could 
be shared between the AWT and JavaFX implementations. In a modular JRE we 
shouldn’t need the Swing modules to have a system tray icon in a JavaFX app.

Scott


On Jul 31, 2020, at 7:34 PM, Scott Palmer  wrote:

 No you can’t. System tray support is something else, not an application icon 
in the start bar or doc.

Scott


On Jul 31, 2020, at 6:02 PM, Michael Paus  wrote:

You can add such an icon to your JavaFX app if you bundle it with the jpackage 
tool distributed with JDK 14+


Am 31.07.20 um 23:07 schrieb Davide Perini:

Hi all guys,
love JavaFX, it's so productive, so easy to use, can't understand why the world don't use 
it "for some tasks".

I know that tray icon can be easily done with AWT but is there something for 
JavaFX?
Is it possible to create a tray icon with JavaFX?

Thanks
Davide







Re: Tray Icon?

2020-07-31 Thread Scott Palmer
I should also point out that this shortcoming was identified nearly 9 years 
ago. 

https://bugs.openjdk.java.net/browse/JDK-8092115

I would love to make some progress on this, but I think doing it right is a 
bigger job than “outsiders” can tackle. Ideally most of the desktop APIs should 
be supported by JavaFX without AWT/Swing. I think that requires some careful 
thought. Some of the code should be independent of the UI toolkit and it could 
be shared between the AWT and JavaFX implementations. In a modular JRE we 
shouldn’t need the Swing modules to have a system tray icon in a JavaFX app.

Scott

> On Jul 31, 2020, at 7:34 PM, Scott Palmer  wrote:
> 
>  No you can’t. System tray support is something else, not an application 
> icon in the start bar or doc. 
> 
> Scott
> 
>> On Jul 31, 2020, at 6:02 PM, Michael Paus  wrote:
>> 
>> You can add such an icon to your JavaFX app if you bundle it with the 
>> jpackage tool distributed with JDK 14+
>> 
 Am 31.07.20 um 23:07 schrieb Davide Perini:
>>> Hi all guys,
>>> love JavaFX, it's so productive, so easy to use, can't understand why the 
>>> world don't use it "for some tasks".
>>> 
>>> I know that tray icon can be easily done with AWT but is there something 
>>> for JavaFX?
>>> Is it possible to create a tray icon with JavaFX?
>>> 
>>> Thanks
>>> Davide
>> 
>> 
>> 


Re: Tray Icon?

2020-07-31 Thread Scott Palmer
 No you can’t. System tray support is something else, not an application icon 
in the start bar or doc. 

Scott

> On Jul 31, 2020, at 6:02 PM, Michael Paus  wrote:
> 
> You can add such an icon to your JavaFX app if you bundle it with the 
> jpackage tool distributed with JDK 14+
> 
>> Am 31.07.20 um 23:07 schrieb Davide Perini:
>> Hi all guys,
>> love JavaFX, it's so productive, so easy to use, can't understand why the 
>> world don't use it "for some tasks".
>> 
>> I know that tray icon can be easily done with AWT but is there something for 
>> JavaFX?
>> Is it possible to create a tray icon with JavaFX?
>> 
>> Thanks
>> Davide
> 
> 
> 


Re: Tray Icon?

2020-07-31 Thread Michael Paus
You can add such an icon to your JavaFX app if you bundle it with the 
jpackage tool distributed with JDK 14+


Am 31.07.20 um 23:07 schrieb Davide Perini:

Hi all guys,
love JavaFX, it's so productive, so easy to use, can't understand why 
the world don't use it "for some tasks".


I know that tray icon can be easily done with AWT but is there 
something for JavaFX?

Is it possible to create a tray icon with JavaFX?

Thanks
Davide