How to change taskbar image through java? - java

When we are running any java application that time one java icon display on the taskbar like
Now I want to change the java icon to another icon
then how can I change that icon?
Currently I am using JavaFX.

I am not sure I followed what you want, but to me it looks like you want the icon of the stage to be changed. Try the code below:
yourStage.getIcons().add(new Image("my_icon.png"));

Related

Change android application adaptive drawable?

Is it possible to change an application icon directly from the program?
I mean, change icon.png in the res\drawable folder.
I would like to let users to change application's icon from the program so next time they would see the previously selected icon in the launcher.
Assuming you mean changing the icon shown on the home screen, this could easily be done by creating a widget that does exactly this. Here's an article that demonstrate how that can be accomplished for a "new messages" type application similar to iPhone:
http://www.cnet.com/8301-19736_1-10278814-251.html

How do you add the file icon to the titlebar, and indicate that something is not saved in JavaFX on Mac?

How do you add the file icon to the titlebar in JavaFX on Mac?
Like this:
And how do you indicate that the document hasn't been saved, like this:
In Swing, this is how you do it, but is it possible in JavaFX too?
No pre-coded solution in this answer. The feature you request is not available out of the box with JavaFX 8.
Some approaches you could consider:
See: JavaFX entirely customized windows? and the Undecorator project. Potentially you could use something like Undecorator in conjunction with resources from AquaFX to achieve what you want.
OR
Another way is to use two stages layered on top of each other, the top stage being transparent and overlaying the icon on the lower stage - you would need to keep them in sync for location, size, visibility and iconification states.
Use a Swing stage and application which implements the icon and place the JavaFX content inside the Swing stage using a JFXPanel.

Android application with the icon as the only user interface

I am currently working on an app which is just a event trigger. I want it to be as simple as possible so I was wondering if it was possible to create an app which works as follows:
When you click on the launcher icon, instead of going into an application, the app's icon merely changes color (e.g. the icon flips from red to green). This would indicate the status of the app. Perhaps if you want to get fancy display a Toast pop-up briefly when it is triggered but nothing more than that. At all times you wold still be in the applications menu.
Add a widget with an icon, then change that icon depending on the tapping of the icon.
I believe that you will find the answer by using ancient wisdom…

Java System Tray Icon on MacOS 10.7.4 not showing animated gif

I'm trying to get an animated gif to appear in the MACOS System Tray using Java. I have PNG icons showing corretly, but as soon as I try and set the icon to an animated gif (so I can show a spinning timer) it goes blank and shows nothing in the system menu tray.
According to the JavaDocs for the System Tray class, setImage should automatically support animated images if given but it doesn't specify the image format or anything else required to get animated icons in the system tray.
Does anyone know how to get this working?
Chances are this problem cannot be resolved with the java.awt.SystemTray class. The only option you have is to try JDIC which uses native code. Frankly I'm not sure whether the JDIC project is maintained anymore, it is quite hard to find information on the web...
In a project of mine I used JDIC do integrate the system tray. You can use it as starting point and get the libraries from there, if you can't find any other resources.

change icon displayed in title bar for a java desktop app

I have a Java Desktop Application project created with NetBeans. The icon that is displayed in my main window's titlebar, by default, is the java logo. The same logo is displayed when I minimize this window to the Taskbar.
I would like to change this icon with one specific to my application, but didn't find how.
Thanks
Please have a look at these links:
how-do-i-change-the-default-application-icon-in-java
how-do-i-set-an-applications-icon-globally-in-swing

Categories

Resources