Comments (9)
@Jeevasimba What do you mean when you say "tray closing system" ?
I use FXTrayIcon in Java Mac apps all the time and it works beautifully ... better than it does in Windows in my humble opinion.
from fxtrayicon.
will it work on linux ?
from fxtrayicon.
@Jeevasimba - if your desktop environment supports JavaFX in the system tray, then it will. I think there is an add-on you can get for Gnome that will support it, but I haven't played with it much in Linux.
from fxtrayicon.
@Jeevasimba This link might be of some interest to you...
from fxtrayicon.
I am using Style.UNDECORATED in my javafx application.
In button I set code like this
public void exit(ActionEvent event){
System.exit(0);
}
If I click that button the tray also closes.
I want to set if I click then the app will go to tray.
How can I set like that with Style.UNDECORATED ?
from fxtrayicon.
@Jeevasimba - First of all, when you instantiate FXTrayIcon, you need to pass in the primaryStage that is created from your Main class
@Override public void start(Stage primaryStage) throws Exception {
FXTrayIcon trayIcon = new FXTrayIcon.Builder(primaryStage).build();
}
Of course you can also include any of your custom build options in that sentence such as your chosen icon, and your menuItems etc.
When your menuItems call up other windows, they need to have their own Stage associated with their given Scene. Then, when you need to close that window, just call the .close()
method for that Stage
myStage.close();
from fxtrayicon.
@Jeevasimba - You can look at this library that I wrote, that makes managing Java Scenes a little easier. With that library, you assign names to your scenes so that you can access them from anywhere in your application. The library lets you create and show a Scene in one line of code, which you can access from anywhere in your program in any class ... closing a Scene is done like this
SceneOne.close("MySceneId");
The library takes all of the minutiae out of managing scenes.
from fxtrayicon.
I set my image as icon.
my image quality is very high
but , in tray the image quality is very low and pixels broken.
I want to set my image as icon with high quality. How can I do this?
from fxtrayicon.
@Jeevasimba
You can use a high quality .png file as your image. Look at the images in the resources folder in the project for some examples. like this one for example. However, in Windows, your image size typically can't be greater than 17 x 17 pixels and usually it needs to be 16 x 16 pixels. On a Mac, you can set it to 22 x 22 pixels and it will look really nice on the mac ... here are some that I use on personal programs that I wrote that run on my mac:
If you save that image to your hard drive, then open it and set your zoom to 100%, you'll have a better idea of what they actually look like.
from fxtrayicon.
Related Issues (20)
- usage in modular fx project? HOT 1
- Ubuntu 20.04 UnsupportedOperationException: SystemTray icons are not supported HOT 1
- NullPointerException when null MenuItem() HOT 3
- When another thread is running, some codding stops working! HOT 5
- After adding menu items, Actions listener on menu items not working HOT 2
- Clicking two time on Tray icon show empty stage? HOT 4
- After adding checkMenuItem, chech or uncheck not working HOT 1
- How to set Taskbar icon to JFXFileChooser? HOT 1
- Icon resolution limited to 16x16 on Windows HOT 1
- Only square icons possible? HOT 8
- addMenuItem after tray is shown throws exception HOT 8
- Feature Request: Make getTrayIcon() public HOT 8
- showMessage() title of the notification window HOT 6
- Icon Size Discussion HOT 1
- Blurry Icon with FXTrayIcon, Clearer Icon with AWT HOT 1
- Tray icon is non-transparent on some Linux desktop environments HOT 4
- JFXCentral Badge HOT 1
- TrayMenu can't show unicode characters HOT 1
- Maven central version HOT 3
- Menu size issue (high dpi) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fxtrayicon.