嗨,我正在制作JavaFX UI,并且希望它是未修饰的,但是,当我运行该程序时,它将使我的Windows任务栏保持可见状态,是否可以解决此问题?
class MagicBar: Application()
{
override fun start(primaryStage: Stage?)
{
stage = Stage()
val fxmlLoader = FXMLLoader()
val root = fxmlLoader.load<Parent>(javaClass.getResource("/MagicBar.fxml").openStream())
controller = fxmlLoader.getController<MagicBarController>() as MagicBarController
stage.initStyle(StageStyle.UNDECORATED)
val scene = Scene(root, 600.0, 80.0)
stage.initStyle(StageStyle.TRANSPARENT)
scene.fill = Color.TRANSPARENT
stage.scene = scene
stage.isAlwaysOnTop = true
stage.show()
}
}