Reputation: 1425
Is it possible to write a Java application (Swing / JavaFX) who doesn't get the focus when launched? So that the application who had the focus before keeps it's focus?
Upvotes: 2
Views: 234
Reputation: 115338
Yes, sure. First if you create Window (not frame or JFrame) it does not get focus by default. Second, just call f.setFocusableWindowState(false); on your frame and get the same behavior.
Upvotes: 6