Questions tagged [tornadofx]

Any questions related to TornadoFX - a JavaFX framework for Kotlin.

TornadoFX is a lightweight JavaFX framework for Kotlin. The project page is a good starting point and contains lots of links to further information. There is also a complete guide in book form.

The framework aims to reduce boiler plate and provide a clean, declarative syntax. You can choose to use as much or as little of the framework as you see fit.

392 questions
20
votes
2 answers

JavaFx vs TornadoFx

I have started working on javafx . I wanted to know the difference between javafx and Tornadofx . How they are inter-related and different from each other. Also when to use what. Are there any cases where javafx is more useful/advised to use than…
Chetna rustagi
  • 463
  • 7
  • 21
12
votes
2 answers

Tornadofx - How to pass parameter to Fragment on every instance

I am a newbie to javafx, kotlin and obviously tornadofx. Issue: How to pass parameters to Fragment on every instance? Lets say I have a table view layout as my fragment. Now this fragment is used at multiple places but with different…
niteesh
  • 329
  • 3
  • 12
11
votes
2 answers

Way of setting PrimaryStage or Scene properties in TornadoFX

I am new to tornadoFX and I don't know how to setup PrimaryStage or Scene properties like Scene height or width or PrimaryStage modality. Please help me. UPDATE I want to set Scene height and width, Look at this example: dependencies { compile…
mojtab23
  • 2,495
  • 5
  • 22
  • 31
6
votes
2 answers

TornadoFx Undecorated window goes fullscreen when restored from task bar

I've been trying out Tornadofx. trying to create a custom title-bar, here's the code I'm currently trying fun main(args: Array) { launch(args) } class MyApp : App(Title::class) { override fun start(stage: Stage) { …
Deepan
  • 124
  • 1
  • 10
6
votes
1 answer

JavaFX / TornadoFX cause Keystroke Receiving prompt on MacOS 10.15 (Catalina)

Problem description I have the a problem with JavaFX and TornadoFX. When I start my application on MacOS 10.15 (Catalina), the following error message appears: Keystroke Receiving "yourapplication" would like to receive keystrokes from any …
KnechtRootrecht
  • 493
  • 1
  • 4
  • 18
6
votes
2 answers

What should be passed to FileChooser?

I am looking solution for javafx FileChooser(in Kotlin). I stuck on this, I cannot pass root View, because Window! is expected: button("open some file") { setOnAction { val fileChooser = FileChooser(); …
Lukas
  • 1,216
  • 12
  • 25
5
votes
2 answers

How to restrict textfields in TornadoFX to numbers only

The problem here is that I wanna make sure that the user doesn't enter any strings or text especially that I need to enter his choice into a database later so I don't things to get messed up in the database's part, here is part of code which is the…
Ali Haroon
  • 83
  • 1
  • 4
  • 12
5
votes
1 answer

Can't use fontawesomefx with kotlin and tornadofx

I'm trying create some JavaFX buttons with FontAwesomeFX icons using TornadoFX. This is the code data class ButtonInfo(val texto: String, val icon: GlyphIcon<*>) val list = listOf( ButtonInfo("Cadastro",…
4
votes
2 answers

Where to put gradle dependencies block in kotlin native project generated by Intellij IDEA?

I'm trying to make my first app in Kotlin Native. I want to add TornadoFX to my freshly created project. I need to add a dependency according to TornadoFX guide dependencies { compile 'no.tornado:tornadofx:x.y.z' } The issue is - I cant figure…
davis
  • 1,137
  • 1
  • 10
  • 28
4
votes
1 answer

Kotin application won't stop when using fixedRateTimer (even when window is closed)

I have a simple app in Kotlin that draws a rectangle and then uses a fixedRateTimer to update the location of the rectangle 30 times a second. The problem I have is that when I close the window displaying the rectangle the application keeps running…
Jen
  • 43
  • 1
  • 4
4
votes
3 answers

TornadoFX unresolved JavaFx

I wanted to create a new project that should be a desktop application. For this purpose, I have selected Kotlin language and TornadoFX framework. I have installed the TornadoFXplugin and created a new Ttornadofx-gradle-project. The base setup made…
Patryk Jabłoński
  • 697
  • 10
  • 29
4
votes
1 answer

How to set minHeight and minWidth to a Window in TornadoFX?

I am using TornadoFX in my project. I have a root View which is a borderPane. I was able to find setPrefSize(1200.0, 720.0) and it works perfectly. However, by default the window is resizable, which user can resize it without any limits. Is there…
amira
  • 416
  • 1
  • 7
  • 24
4
votes
2 answers

Proper way to bind a Property to a Value derived from a control in JavaFx / TornadoFX

Consider the (kotlin/tornadofx) example below, which aims to connect the contents of a textfield with the text of a label through binding. The label should reflect a derived value of the textfield, in this case the hash. How do I properly achieve…
Xaser
  • 2,066
  • 2
  • 22
  • 45
4
votes
1 answer

Why does my tornadoFX ObservableList not receive updates?

I have a simple tornadoFX program that generates some circles in random locations on the screen. However, none of the circles get drawn. I've added some debug code to print a line when a circle is drawn, and it only prints once. I would expect…
Malcolm Crum
  • 4,345
  • 4
  • 30
  • 49
4
votes
2 answers

How to display data using TornadoFX treeview

I am learning how to use kotlin and have started using tornadoFX. I am going through the guide in an attempt to learn it, however I cannot figure out what is meant in the 'TreeView with Differing Types'. It seems to say that I should use star…
1
2 3
26 27