Questions tagged [scalafx]

ScalaFX is a Scala user interface (UI) domain-specific language (DSL) built on top of JavaFX. This means that every ScalaFX application is also a valid Scala application. By extension it supports full interoperability with Java and can run anywhere the Java Virtual Machine (JVM) and JavaFX are supported.

ScalaFX is a Scala user interface (UI) domain-specific language (DSL) built on top of JavaFX. This means that every ScalaFX application is also a valid Scala application. By extension it supports full interoperability with Java and can run anywhere the Java Virtual Machine (JVM) and JavaFX are supported.

214 questions
21
votes
3 answers

JavaFx2 or ScalaFx + Akka

How to run Akka actors in a JavaFX/ScalaFX Application ? (This is an update of question based on the first answers) Is the solution to share the same execution context? Meaning having the Actors dispatchers based on the JavaFx ExecutorService ? (The…
MaatDeamon
  • 9,532
  • 9
  • 60
  • 127
12
votes
2 answers

What are the benefits of ScalaFX besides adding syntactic sugar for bindings?

I am trying to implement a simple note organizer with some mind mapping functionality using JavaFX and Scala. I am trying to decide whether I should call JavaFX code directly from Scala or via ScalaFX ? I don't know if it is worth to learn ScalaFX…
jhegedus
  • 20,244
  • 16
  • 99
  • 167
11
votes
3 answers

What's the magic behind ScalaFX to make OpenJDK 9+ actually work?

Environment: OpenJDK 64-Bit Server VM Zulu12.2+3-CA (build 12.0.1+12, mixed mode, sharing) Scala 2.12.7 Windows 10 Professional, X86_64 IntelliJ IDEA 2019.1.3 (Ultimate Edition) I checked out the scalafx-hello-world from GitHub, built and ran it…
Hannes
  • 5,002
  • 8
  • 31
  • 60
9
votes
1 answer

Scala, GUI and immutability

I created an algorithm that calculates certain things. This can be considered as the model. The algorithm is implemented in a fully functional way, so it uses immutable classes only. Now using this model, I would like to develop a GUI layer on the…
David Frank
  • 5,918
  • 8
  • 28
  • 43
9
votes
1 answer

ScalaFx: Event Handler with First Class Function

i try to write an event handler in a scalaFx app. I found followin solution: import scalafx.scene.control.ListView import javafx.scene.input.MouseEvent import javafx.event.EventHandler ... val list = new ListView[String] { …
USSEraser
  • 315
  • 2
  • 11
8
votes
1 answer

ScalaFX: HelloWorld compilation error

I'm new to Scala and SBT so I might be missing something obvious. I was trying to compile the HelloWorld example on http://www.scalafx.org/docs/quickstart/ I created a file build.sbt containing: scalaVersion := "2.11.5" libraryDependencies +=…
kvbx
  • 380
  • 2
  • 11
7
votes
4 answers

ScalaFX Button => How to define the action?

I'm trying to definde the onAction accion for a Button done in scalafx but I can't make it to work. package App.Desktop import javafx.event.EventHandler import scalafx.event.ActionEvent import scalafx.scene.control.Button class Window() { …
Shelen
  • 159
  • 1
  • 8
7
votes
1 answer

How can you get ScalaFX to play nice in the SBT console?

I'm writing an image library for intro programming students to play with. (I stole the idea and the patterns from the image library for DrRacket.) https://github.com/dupontmanualhs/dm-image It's mostly written in Swing (that's the master branch),…
Todd O'Bryan
  • 2,234
  • 17
  • 30
6
votes
0 answers

JavaFX: Entirely turn off scene anti-aliasing (inclusive of control text anti-aliasing)

Since both System.setProperty("prism.lcdtext", "false") and System.setProperty("prism.lcdtext", "true") are unsatisfactory (the former appears downy whereas the latter appears colorful at the letter edges even though the text color is black; on my…
ideaboxer
  • 3,863
  • 8
  • 43
  • 62
6
votes
2 answers

Scala name mangling of private fields and JavaFX FXML injection

The following example and explanations are quite long, so here is the gist of my question: how to deal with scalac's name-mangling of private fields when using a framework which insists on performing field injection (on fields which really should…
Cyäegha
  • 4,191
  • 2
  • 20
  • 36
6
votes
2 answers

Is there a simple way to display hint texts in JavaFX?

In the Borland VCL library, almost all controls had a hint property. During runtime, when you position mouse over the respective control, a small box with the hint text pops up and disappears again when you move the mouse, like the help messages in…
MKaama
  • 1,732
  • 2
  • 19
  • 28
5
votes
1 answer

Make ScalaFx working on both JDK 8 and 11

To my dismay I have realized my open source ScalaFX application does not run with JDK 11. The application was developed with JDK 8. I have read about a JFX module and I can see there exist versions of ScalaFX dedicated to JDK 11 and newer (ScalaFX…
Suma
  • 33,181
  • 16
  • 123
  • 191
5
votes
1 answer

ScalaFX (JavaFX): Stage content does not resize on window resize

To inspect this unexpected behavior, I simply put a TextArea directly into the Scene contained by the PrimaryStage: On app start, the TextArea exactly fits the window (as expected). But the size of the TextArea does not change if I move the window's…
ideaboxer
  • 3,863
  • 8
  • 43
  • 62
5
votes
1 answer

Creating custom ScalaFX controls

What exactly is the right way to create a custom ScalaFX control? I'm coming from Swing and Scala Swing, where custom components are simply created by extending Component or Panel. But when I try to extend ScalaFX's Control, I can't extend it…
Benedict Lee
  • 714
  • 8
  • 21
5
votes
1 answer

Editable Boolean Columns in ScalaFX TableView

I'm new to ScalaFx and want to create a TableView containing an editable Boolean column with CheckBoxs (as well as editable String and Int columns with TextFields). I assume I'll need to use CheckBoxTableCell. I'm using JDK 7u25, ScalaFX 1.0.0-M4/M5…
Dexter
  • 53
  • 3
1
2 3
14 15