Search code examples
javawpfwindowsjavafxwindow

JavaFX: Custom window with native behavior


I like to have a fully customized Window in JavaFX. Exactly the same problem as here:

https://code.msdn.microsoft.com/WPF-styling-a-Window-in-fcf4e4ce

Using an UNDECORATED JavaFX stage, I have to implement all window functionality on my own - and lose all native window behavior, including:

  • Maximize when dragged to the top
  • Side-by-Side view when dragged to the sides
  • Minimizing/Maximizing when clicking taskbar

Can I somehow access the native Windows API to implement these functionalities? Or do you have any other ideas?

Please do not recommend Undecorator, it does not meet my requirements.


Solution

  • 4 years later, following Custom Window Frame Using DWM and dealing with some JavaFX issues, I was able to implement this in what I published as fxstage.