0

I am using OpenJFX 11 and set it up according to the documentation here:

https://openjfx.io/openjfx-docs/#install-javafx

I used their HelloFX example and compiled it like this:

cromon@cromon-elementary:~/temp$ /opt/java/latest/bin/javac --module-path $PATH_TO_FX --add-modules=javafx.controls HelloFX.java

This works fine, also running it in theory works:

cromon@cromon-elementary:~/temp$ /opt/java/latest/bin/java --module-path $PATH_TO_FX --add-modules=javafx.controls HelloFX

No issues so far. However the created window is undecorated (i.e. has no system menu, only the content area, see screenshot below for an example). I think thats not how it should be. Is anyone having similar issues?

OS information:

NAME="elementary OS"
VERSION="5.0 Juno"

Java information:

cromon@cromon-elementary:/opt$ /opt/java/latest/bin/java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)

And according to the window from HelloFX: "Hello, JavaFX 11.0.1, running on Java 11.0.1"

enter image description here

And here is an example from Swing:

val frame = JFrame()
frame.title = "I have a system menu and everything"
frame.preferredSize = Dimension(500, 300)
frame.pack()
frame.isVisible = true

enter image description here

Cromon
  • 821
  • 10
  • 24
  • I have added a JavaFX and a Swing screenshot for comparison – Cromon Dec 25 '18 at 10:47
  • Do you mean window title bar? – ecle Dec 25 '18 at 11:36
  • Exactly, in the screenshots the area with "I have a system menu and everything" in it which is missing in the javafx screenshot. – Cromon Dec 25 '18 at 11:42
  • 1
    Possibly related to a gtk issue, see [this](https://stackoverflow.com/a/53351433/3956070) – José Pereda Dec 25 '18 at 14:14
  • Thats it! Funny enough this program is going to be a less platform dependent launcher for a c++ gtk3 application I am working on :) – Cromon Dec 25 '18 at 14:18
  • Please go forward and add it as an answer! – Cromon Dec 25 '18 at 14:18
  • @Cromon rather close as duplicate? – Naman Dec 25 '18 at 16:17
  • Guess I was too slow, should have answered it myself, then it would have an answer now :). Personally I generally dislike the idea of the duplicates as a reader when I encounter a question via google etc. Always means I have to read the other question and the answer and understand it to figure out if it really answers the "duplicate" question, if it even is a duplicate. Much simpler for future readers if the relevant parts are repeated. In this case it is probably ok, with the comment from José its clear which part is a duplicate even if the question is unrelated. – Cromon Dec 25 '18 at 20:24

0 Answers0