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
5
votes
2 answers

Integer Columns in ScalaFX TableView

I am new to ScalaFX. I am trying to adapt a basic TableView example, to include Integer columns. So far, I have come up with the following code: class Person(firstName_ : String, age_ : Int) { val name = new StringProperty(this, "Name",…
Eduardo
  • 8,362
  • 6
  • 38
  • 72
4
votes
2 answers

jpackage on Windows: The system cannot find file, error 103

I am trying to package a ScalaFx app I built using jpackage and having trouble on windows (mac & linux work just fine). I am building a fat jar using sbt assembly and then using jpackage to create a .msi however I am getting this error: $ jpackage…
benthecarman
  • 125
  • 7
4
votes
1 answer

ScalaFX - How to get the title of a Scene using a method

I am using ScalaFX and trying to learn how it works. As an exerpiment (not what I will do in production) I want a method that gets the title of a window. So here is my Graph.scala file: package graphing import scalafx.application.JFXApp import…
finite_diffidence
  • 893
  • 2
  • 11
  • 20
4
votes
0 answers

How to efficiently plot continuous functions in ScalaFX/JavaFX

I'm working on a regression model visualizer and my current bottleneck has to do with plotting continuous functions. How the program works is that it loads data from a file containing (x, y) values, does the math for the regression model with…
4
votes
1 answer

How can I get a value from a the ScalaFX thread?

I have a myNode: scalafx.scene.Node that I'd like to turn into a bitmap so that I can save it to disk, compare it to other bitmaps, etc. I think the correct code to turn it into a scalafx.scene.image.WritableImage is val writableImg = new Scene {…
Todd O'Bryan
  • 2,234
  • 17
  • 30
4
votes
1 answer

Strange type mismatch error

I have a table column errorFixed of type TableColumn[Error, Boolean] inside a TableView[Error]. My Error class has a val fixed: Boolean which I try to put into this table column. I tried errorFixed.cellValueFactory = features => …
mgttlinger
  • 1,435
  • 2
  • 21
  • 35
4
votes
1 answer

How to limit the width of the content of a ScrollPane

I have a Scrollpane witch contains several TitledPanes in a VBox. I want to only scroll in vertical direction. The width of the content should be limited to the width of the ScrollPane. How can i get the TitledPane to Clip the Title when it's width…
Fabian
  • 1,224
  • 1
  • 11
  • 26
3
votes
1 answer

How to dynamically add Nodes to VBox in ScalaFX

My ScalaFX app has a Button that adds a GridPane to a VBox. I tried directly updating the VBox children in Button.onAction but that causes the Button to become non-responsive after rendering the first added GridPane. I am now trying the following…
user1332148
  • 1,256
  • 2
  • 11
  • 24
3
votes
1 answer

Handle input events in stateless manner

Yesterday I`ve asked how may I handle keyboard input (with ScalaFX) in a functional manner. Thanks to @alfilercio help I came up with something like this: class InputHandler { private val goUp: Int => State => State = step => state =>…
ayeo
  • 482
  • 1
  • 4
  • 16
3
votes
1 answer

How to change LineChart XAxis lower/upper bounds in ScalaFX?

I have a ScalaFX LineChart whose XAxis is time. The data is dynamic, being updated in an AnimationTimer. As time progresses the plot moves to the right but the plot always starts at 0, so the visible domain increases, compressing the data…
user1332148
  • 1,256
  • 2
  • 11
  • 24
3
votes
1 answer

How to set the items in a ChoiceBox

I have a ChoiceBox that I want to set with an ObservableList. In JavaFX I might do: ObservableList genres = FXCollections.observableArrayList( "Chamber", "Country", "Cowbell", "Metal", "Polka", "Rock" ); choiceBox.setItems(genres); But…
user79074
  • 4,937
  • 5
  • 29
  • 57
3
votes
1 answer

Can't move TextFlow inside a new scene

In my ScalaFX project I want to create a separate help page for the user in which he/she can click a topic which causes instructions to appear next to the clickable topics. Problem is that when I create the new scene for the help page no matter what…
3
votes
2 answers

Changing the size and symbol of scatter chart plot points in ScalaFX

I want to make a linear regression program which visualizes the data to user. I'm using EJML for calculations and ScalaFX for front end. Everything is going fine but when I plot the data using Scatter Chart, the line drawn from the data is set to be…
3
votes
0 answers

How to bind a fxml file into a custom dialog box in scalafx?

I am trying to create a custom dialog box in scalafx.I have an fxml file which contains all the text fields for the dialog box. Now I need to bind to the dialog box from the controller file where I have written the methods. How to do this?
Nikhil
  • 33
  • 6
3
votes
1 answer

ScalaFX: Is it possible to define controls in objects other than the application object?

What I am trying to accomplish is: having a ScalaFX application with some nice ordered objects called Buttons, Labels, Checkboxes and so on to keep everything nice and in order. Here a little example to show what I mean: package…
Michael W.
  • 182
  • 1
  • 12
1
2
3
14 15