Tooltips and context menus appear in the wrong pla...
# tornadofx
m
Tooltips and context menus appear in the wrong places (much higher and the correct place, usually). What can be the cause? How do I fix that? I'm using Ubuntu 20.04.1 LTS, with the stock openjdk version "11.0.8" 2020-07-14
m
can you post a screenshot?
m
Sure.

https://i.ibb.co/YQ7vvgj/Screenshot-from-2020-08-27-20-41-24.png

The one above is the tooltip of the are containing the image and the labels in the bottom half of the screen.
m
so when mouse hovers over the art the tooltip shows up at the top like that?
m
Exactly!
Something similar happens with context menus, too
m
what javafx version? I assume you are using the gradle javafx plugin
I have seen some weird stuff with some javafx version, try 14
m
Is this enough to build and run against javafx 14?
Copy code
javafx {
    //version = "11.0.2"
    version = "14"
    modules = ['javafx.controls', 'javafx.graphics']
}
Nothing changed. Tooltips still off place.
I think it's related to the SplitPane. Tooltips from the upper part of the SplitPane are fine.
I attempted to make a uberjar and run my application on Windows, in order to see if there is any difference. I installed JDK 1.8, since that's what pre-2.0 tornadofx is supposed to run against. Is this right? Doing so, I got error because of bad major version of the classes in the uberjar. Turns out, I can manage to compile my classes as 1.8 (52) but the javafx classes are 54. I replaced the Java 11 SDK in this project (in sync with what comes with Ubuntu) with a Java 1.8 SDK. Now the project does not compile, because the javafx plugin is compiled with the wrong bytecode major version. How should I configure my system and my project to run smoothly my application?
m
if you plan to run a javafx app with JRE 1.8, you have to build it with 1.8
also, you have to use a JDK that includes JavaFX like Zulu, AdoptOpenJDK does not include JavaFX in the version 1.8 they provide
m
There is any other possibility? I read that tornadofx is only compatible with javafx 8 (which comes with JDK 1.8).
I'm really confused.
m
yeah, java versions are a mess especially with JavaFX
m
Also, i attempted to downgrade everything to 1.8 but, as I said above, the build fails because the javafx plugin is not compatible anymore.
m
JavaFX used to be included with the JDK up until 1.8, after that, is was separated so if you run with version 1.8, you have to use a JRE that includes JavaFX
m
What do you build and run your tornadofx applications with?
m
I use JDK 11 and use the "bad ass" runtime plugin to package the app with the JRE
m
Never heard of "bad ass" runtime plugin. I'll google it
I haven't updated that build to use the bad ass runtime plugin yet
I was working on a gradle plugin to download all the JDKs and basically do everything for you
let me see if I can get the basic version setup and push it real quick
m
I found the plugin. I'll read about it later. I need a pause now. Thanks for the help so far. I really didn't decide yet if i should use tornadofx or just drop it and use JavaFX directly.
I'll report back later.
m
I don't plan on going back to JavaFX
kotlin and tornadofx is so much easier and less code
it is a bit tricky though, I find myself looking at the tornadofx code quite a bit
I pushed updates to my build for the bad ass runtime you can see as an example
it uses groovy, I haven't converted to kts yet if you are using that
m
Thanks, Marshall. I use groovy, too. I won't be able to check this for a while, because I'm overwhelmed by the issues that I'm having with IDEA which are preventing me from doing almost anything useful.
b
Are you using gnome? and/or a wayland DE?
I have the same issue but not on all machines and only when using multiple displays
intellij has some issues as well, so that's not just a javafx issue