Open Java GUI using desktop Icon on mac - java

I have made a Java Application on Eclipse on my MacBook Pro. The GUI is made using FXML. How do I create an icon on my desktop that I can click and it launches the First GUI Screen of my application? Thanks.
Edit: I want it so that I click on an icon on my desktop, and it immediately launches my program and the first screen of the GUI opens and is ready to go.

Related

How to deploy the program from the system tray with shortcut on desktop

I have a program which can minimized to tray using AWT, how do I make it so that when a user opens it via a shortcut on the desktop it unfolded, and did not run a new program.
Check java.awt.SystemTray and How to Use the System Tray. But the latter describes on Swing.

How to correctly implement SystemTray/Pinned Taskbar applications on Windows with Java

On OSX my Java application has a dock menu (using Apples extension to Java com.apple.eawt.Application.getApplication().setDockMenu) , allowing tasks to be started by right clicking on the dock icon, also files can be dropped onto the dock icon (Using Apples com.apple.eawt.OpenFilesHandler) and my application starts processing the dropped files.
I'm trying to replicate this functionality if sensible on Windows, if this behaviour on Windows is weird I don't want to do it. I cannot find a way to add tasks to to the popup menu for the application icon on the taskbar (my application is has an .exe wrapper provided by winrun4j), is that possible ?
But I have used java.awt.SystemTray to add a right click menu to that, and it works but I'm unclear in Windows when one would use the taskbar icon and when the SystemTray. What I cannot do is have the SystemTray respond to files being dropped onto it, and according to this Oracle Java issue it will never happen http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7119272. What I'm unclear about is if the Windows System tray is never meant to respond to things being dropped on it, or if this is just missing functionality in the Java implementation.
And is there way to drag files onto the taskbar icon instead, or is this whole notion of dragging files onto minimized icons purely an OSX thing and not relevent to Windows ?
To answer my own question files cannot be dropped directly onto pinned taskbar icon or the toolbar icon, but if you drag files onto the taskbar icon it should cause the main window to be displayed and then the files can be dropped onto the window instead, and this behaviour happens automtically with no coding required on my part.

Focusing on an external java window? WINDOWS

I'm using a robot to click on a certain point on the screen. I just need a way for the robot to bring the desired window to focus. Now here's where the real problem lies, the window is a Java window, but not one I made. I used a VBscript to focus on Firefox earlier, but I'm not sure what to do. When I mouse over the icon on my toolbar, it says the windows name is "BitMinter Client v1.4.2" but in Task Manager it calls the process "Java(TM) Platform SE binary (32 bit)?
How do I focus in on the window?
Having the robot input ALT+TAB won't work because the window isn't second on my ALT+TAB list.
AppActivate looks for matching Window's titles.
Use spy++ (Windows SDK and most MS development tools) to get the window title.
You mention firefox so I don't know what type of Window you are referring to. In IE most web page elements (and for that matter very many other Window's things) haven't been Windows for decades. I don't know how firefox or java are implemented.
Windows basic architecture is windows (such as edit controls/buttons) inside other windows (a pane) inside a top level window (ie notepad) inside the desktop window.
To take notepad. There is a main window, menu bar, statusbar window, edit control window. Each of them has a title and class. This is notepad's title and class.
Untitled - Notepad Notepad
«No Window Text 0» Edit
«No Window Text 0» msctls_statusbar32

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

How can I hide a "java desktop application"

I'm newbie in Java so I deicide make an application use "java desktop application" in Netbeans. It creates 3 file (ProjectNameAboutBox.java (JFrame Form), ProjectNameApp.java, ProjectNameView.java (JFrame Form and all my code in this file)).
Now, I want to ask how can I hide and restore this application when run? I already made a systemTray for it
Thank you
Simply frame.setVisible(false) to hide and frame.setVisible(true) to show.

Categories

Resources