Search code examples
javajavascriptappletfocusjavafx-2

Can a JavaFX 2 applet request focus and so focus on browser / tab?


I'm wondering if there would be any solution to show and focus on browser's tab containing a javafx 2 applet programmatically from the applet. I don't think there's a simple solution, but who knows :)

PS : Obviously, stage.requestFocus() and stage.toFront() don't work.


Solution

  • No, there's absolutely no way to do this using no custom native bridge doing the job, even with a javascript bridge. With the next versions of JavaFX neither.

    And applets are not supported anymore in Chrome, so I think nobody would try that anymore.