Skip to content
Advertisement

Tag: kotlin

JavaFX: How to overwrite button action in custom Dialog

I work on desktop application based on JDK 8 and JavaFX. I created custom dialog class with 2 buttons(finish and cancel). My goal is to return the list of strings added in dialog (after clicking finish button, dialog returns list. Cancel makes return empty list). I have problem, beacause function showAndWait return type of button which I clicked (‘ButtonType.FINISH’ or

Kotlin gzip uncompress fail

I try to simplify my java gzip uncompress code to kotlin. But after I changed, it sames broken. Here is the java code This is my kotlin code. And I got this error. It seems that the decompression process was interrupted by reader? Answer The readText(charset: Charset = Charsets.UTF_8) decodes the bytes into UTF-8 character set, which is why it

Gradle Kotlin DSL – Build script fails when java.sourceCompatibility defined in Parent but build is successful when added to child module

Am trying to setup a new repository for a multi module springBoot application using gradle (Kotlin DSL for build scripts) As part of the same I am trying to declare generic configuration and dependencies needed for all subProjects. In doing so, I am trying to define sourceCompatility for all child projects in the subprojects block of parent build.gradle.kts file When

Getting image in POST request using Java and vert.x

I got the following question, I can’t get image which I’m sending from android app to server, I’m sending image from app using kotlin, and receiving it on server written with Java using vert.x. I send it with following code: on server side I’m handling it like But I can’t get anything into imageByte variable. Answer You need to add

RSocket retrieveFlux() with Kotlin

I am trying to write a client for my server (both in Kotlin and using Spring Reactive Web). I encountered this problem while trying to use the RSocket. How can I get a Flux using RSocket? Answer You need to get reference of Class. You can use either Int::class.java or Int::class depending whether you need java Class or KClass reference

Advertisement