Hello, today I stumbled upon such a problem: I don’t know how to make a notification in Java in Windows (as when updating java). I know about the icons and the menu in the tray, but I did not find the alert anywhere
- An alert is a window without decorations with the style applied to it and the content posted. You can build on this and generate a window that pops up in the lower right (most often) part of the screen. You can implement this solution using JavaFX. Close task: stackoverflow.com/q/395831/210827 . If an alert is required to be displayed at some system event, then it is necessary for some service (application in the background, written by you) to recognize this event and cause (display) an alert. - DimXenon
- Somehow it’s not a very good option to generate a notification location window, if you run your code not on windows, or for example windows will have such a design theme, but if you make something like a rectangle that is located on top, it will come down (this can be used as an idea that is easier to implement) - Denis Kotlyarov
- @DimXenon, Yes, it can be so, but as far as I know there is a separate command in Java to generate an alert. I can of course be wrong. Java began to study recently, therefore, it is desirable to immediately command - Levvsev
- code.makery.ch/blog/javafx-dialogs-official - all sorts of forms of notifications, stackoverflow.com/questions/9119481/… - talking about JOptionPane.showMessageDialog (null, "Message"); and showMessageDialog (null, "message"); - DimXenon
- stackoverflow.com/questions/7080205/popup-message-boxes is an option for JavaFX. - DimXenon
|
1 answer
I suggest reading about TrayIcon ( http://docs.oracle.com/javase/6/docs/api/java/awt/TrayIcon.html ), and more specifically about the displayMessage method.
|