https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
tornadofx
  • n

    napperley

    05/28/2019, 4:53 AM
    Sample JavaFX app with 1080p resolution on 14" display. Text looks a bit too small. Is there a way to apply a UI scaling factor of 1.2?
    • 1
    • 1
  • s

    seiv

    05/28/2019, 12:52 PM
    Ali, just override 'stop' function in stage
    class MyApp : App(MyView::class) {
        override fun start(stage: Stage) {
    ... some custom code
        }
        override fun stop() {
          if(db_still_up) {
             notify_warn("can't exit right now")
           } else {
            Platform.exit()
            System.exit(0)
          }
        }
    }
    👍 1
    a
    • 2
    • 1
  • n

    napperley

    05/28/2019, 10:38 PM
    What is the most straightforward way to apply a UI scale of 1.2 for the entire JavaFX application?
    r
    a
    • 3
    • 9
  • a

    amanda.hinchman-dominguez

    05/29/2019, 4:46 AM
    it doesn’t seem to like the javafx modules being loaded, but I’m not entirely sure why the KotlinCoreEnvironment for parsing files is trying to use javafx modules?
    n
    • 2
    • 5
  • a

    alilosoft

    05/29/2019, 8:26 AM
    This solution work for me, but I don't know if this is the best way to do it, or there is more elegant way???
    s
    • 2
    • 1
  • a

    amanda.hinchman-dominguez

    05/29/2019, 9:56 PM
    Figured it out. openJDK11, openJFX11 is not ready to play with KotlinScripting
    n
    • 2
    • 1
  • a

    amanda.hinchman-dominguez

    05/29/2019, 9:56 PM
    downloading ZuluJDK8 saved my life after downgrading Gradle and Kotlin lol
    n
    • 2
    • 5
  • n

    napperley

    05/29/2019, 11:04 PM
    Applying this stylesheet at the application level sorts out text scaling (on a 14" display with a 1080p resolution) but is far from ideal:
    import tornadofx.Dimension
    import tornadofx.Dimension.LinearUnits
    import tornadofx.Stylesheet
    
    class AppStyle : Stylesheet() {
        init {
            s(".root") {
                fontSize = Dimension(1.3, LinearUnits.em)
                fontFamily = "Noto Sans"
            }
        }
    }
    r
    • 2
    • 3
  • n

    napperley

    05/31/2019, 1:27 AM
    How is concurrency handled with TornadoFX? There doesn't appear to be anything about concurrency in the TornadoFX Guide ( https://edvin.gitbooks.io/tornadofx-guide ). The TornadoFX Wiki has a page on concurrency ( https://github.com/edvin/tornadofx/wiki/Async-Task-Execution ) but is it still relevant?
    c
    • 2
    • 3
  • c

    Carlton Whitehead

    05/31/2019, 2:16 AM
    I'm thinking of writing a JUnit 5 extension for TornadoFX in the spirit of TestFX's ApplicationExtension to make it a bit easier to cleanly set up and tear down test apps. Would that be of interest to anyone?
    👍 1
    • 1
    • 4
  • r

    Ruckus

    06/03/2019, 8:19 PM
    @Carlton Whitehead It's even worse than that:
    SwiftUI requires iOS 13, watchOS 6, tvOS 13, or macOS Catalina. To use the SwiftUI design canvas Xcode 11 must running on macOS Catalina.
    c
    c
    • 3
    • 3
  • a

    abhinay

    06/04/2019, 5:27 AM
    @napperley If its important to you, backport the fix and build OpenJFX yourself 😉
    n
    • 2
    • 1
  • n

    napperley

    06/05/2019, 8:28 AM
    Is there a sample available where JFreeChart is used with TornadoFX?
    a
    • 2
    • 3
  • p

    Pietro Poluzzi

    06/09/2019, 1:46 PM
    Good morning everyone! I'd like to know how to add an icon to the GUI, in other words the window that's opened after running the program. (I have no experience whit JavaFX).
    j
    • 2
    • 2
  • s

    Stephane M

    06/11/2019, 12:27 PM
    Hey all, btw we forgot to let you know but we released our Kafka GUI desktop tool all built using TornadoFX: https://conduktor.io And here's the twitter if you want to see some screenshots https://twitter.com/getconduktor
    🎉 2
    👍 6
    d
    • 2
    • 2
  • v

    ValV

    06/13/2019, 10:18 PM
    Sorry, I haven't been using Kotlin for a while, can you tell me, please, what is the actual version of JFX/Java shall I use now to build TornadoFX applications?
    c
    n
    c
    • 4
    • 16
  • o

    Ovsyannikov Alexey

    06/15/2019, 2:21 PM
    Hello Is there some good library for work with maps in javafx or tornadofx?
    c
    a
    • 3
    • 4
  • n

    napperley

    06/17/2019, 1:42 AM
    What is the way to handle a close event for a Dialog? Tried setting
    primaryStage.onCloseRequest
    however the onCloseRequest event is being ignored.
    a
    • 2
    • 3
  • j

    jschneider

    06/18/2019, 1:28 PM
    Hi guys. I have added tableView to a fieldset. Any way to configure the layout for the table? I want to grow it vertically...
    c
    • 2
    • 2
  • j

    jschneider

    06/19/2019, 6:29 PM
    Hey guys. Another question: I want to sort the content of a tableview by default. I want to use the first column comparator. Any ideas?
    c
    • 2
    • 1
  • c

    coletz

    06/28/2019, 10:29 AM
    Can someone explain me how to use zulufx? I am trying to build a tornadofx app, but I can't compile it due to "missing dependencies in the classpath" (javafx one of course). It seems like intellij idea is ignoring the kotlinOptions.jvmTarget="1.8"... Don't know what to do.
    c
    • 2
    • 2
  • a

    amanda.hinchman-dominguez

    07/02/2019, 5:20 PM
    Hey, has anyone worked with JavaFX/TornadoFX for surface pro?
    a
    t
    • 3
    • 6
  • s

    sbyrne

    07/02/2019, 7:36 PM
    Is it possible to but a button in the header of a
    TableView
    ?
    p
    • 2
    • 3
  • a

    altavir

    07/06/2019, 2:22 PM
    We are starting to really need 2.0 release. Maintaining JDK8 projects becomes more and more tiresome. And in some cases we need JLink and it is becomes really complicated to work around non-working parts. Are there any ideas when 2.0 will be available?
    v
    c
    +3
    • 6
    • 29
  • d

    darkmoon_uk

    07/08/2019, 10:32 AM
    fxlauncher question here (hope that's Ok under tornadofx...): I want to use fxlauncher to drive javapackager and create an installer; but I don't want to have updates hosted at a particular URL, at least not during development. However, fxlauncher appears to be so focused on its update function that the Url is mandatory: plugin refuses to run without an applicationUrl. Can I turn off the update part of it?
    a
    • 2
    • 26
  • m

    Martin

    07/11/2019, 1:18 PM
    I have a column in a tableview where I would like to set the text-alignment to "right". I tried this but the text ist still left-aligned:
    readonlyColumn("Preis", ArticleDTO::money).cellFormat {
                                    text = it
                                    tableColumn.isSortable = false
                                    style {
                                        fontFamily = "monospace"
                                        textAlignment = TextAlignment.RIGHT
                                    }
                                }
    Am I doing something wrong? I wonder because the rest (fontFamily) works..
    c
    • 2
    • 3
  • g

    geepawhill

    07/16/2019, 12:26 AM
    Hey folks. I've had a stack overflow question out for a while, I'm wondering if any of you have answers. The short summary: I have a ViewModel whose underlying domain object has a field of MutableList. I don't seem to be able to bind that such that the list contents change when the item changes, unless I make the underlying domain object an ObservableList, which is not something I want to do in this setting. https://stackoverflow.com/questions/56696408/bind-itemviewmodel-to-domain-class-list
    s
    p
    • 3
    • 5
  • p

    pike

    07/17/2019, 12:56 AM
    My tornadoFx client consumes an api with json results, literally every model has a SimpleListProperty<datatype>() in it. Here is an example:
    data class rule(val name: String, val def: String)
    class ruleBook{
        val rulesProperty = SimpleListProperty<rule>()
        var rules by rulesProperty
    }
    class RuleBookVM: ItemViewModel<ruleBook>() {
        val rules = bind(ruleBook::rulesProperty)
    }
    
    class TestView : View("Test View") {
        val myRuleBook: RuleBookVM by inject()
        init {
            myRuleBook.rules.value.add(rule("hoge", "fuga"))
        }
        val name = textfield()
        val definition = textfield()
        override val root = vbox{
            label("Test")
            add(name)
            add(definition)
            button("Add a rule").action{
                myRuleBook.rules.value.add(rule(name.text, definition.text))
            }
            tableview(myRuleBook.rules) {
                column("name", rule::name)
                column("def", rule::def)
            }
        }
    }
    g
    • 2
    • 9
  • o

    Ovsyannikov Alexey

    07/17/2019, 9:54 AM
    Hello, I have faced the problem that TornadoFX currently is not fully support work with Java > 8. Unfortunatelly, I have a few things which I may have only using Java 11 + JavaFX 12. Do anybody tried to use it together? Which problems was found and how they can be solved?
    k
    • 2
    • 2
  • a

    abhinay

    07/17/2019, 10:24 AM
    @Ovsyannikov Alexey Please try 2.0.0-SNAPSHOT in your application and log issues, if you find any, at https://github.com/edvin/tornadofx
    a
    • 2
    • 4
Powered by Linen
Title
a

abhinay

07/17/2019, 10:24 AM
@Ovsyannikov Alexey Please try 2.0.0-SNAPSHOT in your application and log issues, if you find any, at https://github.com/edvin/tornadofx
a

albrechtroehm

07/17/2019, 7:56 PM
Hey, i also got quite confused when trying to setup tornadofx with openjfx missing sometimes ... after some reading and a lot of tests i got the impression to go for JDK11 + OpenJFX11.0.2 from Glucon (+download sdk and use --addmodules) + TornadoFx(2.0.0-SNAPSHOT vs JDK-10-Branch ?) Would really appreciate your thoughts or best practices.
a

abhinay

07/19/2019, 5:46 AM
Hi @albrechtroehm! 2.0.0-SNAPSHOT is realised from JDK-10 branch. If you use Maven/Gradle, you should be able to use javafx plugins, add TornadoFX 2.0.0-SNAPSHOT and a dependency and it should work.
a

albrechtroehm

07/19/2019, 7:26 AM
Hey, thanks for the advice, i will look into this!
a

abhinay

07/19/2019, 7:58 AM
If you have any further questions, feel free to ping me.
View count: 3