JavaFX – change the black background bar when resizing the window
•
Java
Everyone knows the problem If you quickly resize a JavaFX application, some areas will be painted black due to recalculation of the user interface
In my opinion, it looks really ugly when you have the default gray touch Caspian or Modena theme and a very heavy UI that needs to be recalculated over time
This is my question: can I change this color?
Solution
You can use stage initStyle(StageStyle.TRANSPARENT); And create your own border (window frame)
The black border will now take on the color of the last pixel on the edge
It may not be a good solution when you use the default style, but it is a good thing for a large number of custom style applications
Maybe try setting the color of the scene
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码