0

public class Hello extends Application{

@Override
public void start(Stage stage) throws Exception {
    Parent root = FXMLLoader.load(getClass().getResource("hellofxml.fxml"));
    Scene scene = new Scene(root,500,500);
    stage.setScene(scene);
    stage.setTitle("hello world");
   // stage.initStyle(StageStyle.TRANSPARENT);
    stage.show();
}


public static void main(String[] args) {
    launch(args);
    System.out.println("hello");
}

}

The output of this code gives me a simple window without any close, minimize , maximize buttons, in other words a titleless window

I want to know where the problem

images links are

https://ibb.co/5YNfR1G https://ibb.co/Hq9pM0S

fxml code

<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.AnchorPane?>


<AnchorPane id="AnchorPane" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/11.0.1" fx:controller="Hello.HellofxmlController">
   <children>
      <Button fx:id="ok_btn" layoutX="238.0" layoutY="174.0" mnemonicParsing="false" text="ok" />
   </children>
</AnchorPane>
Chathuranga Chandrasekara
  • 20,548
  • 30
  • 97
  • 138
noob_to_so
  • 55
  • 6

1 Answers1

0

This is a known issue with GTK3 and JavaFX and is already answered here

AbsoluteDev
  • 154
  • 2
  • 9