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
1
vote
1 answer

Updating UI from a background thread in ScalaFX

Here is the code: import javafx.event import javafx.event.EventHandler import scalafx.application.{Platform, JFXApp} import scalafx.application.JFXApp.PrimaryStage import scalafx.event.ActionEvent import scalafx.scene.Scene import…
qed
  • 22,298
  • 21
  • 125
  • 196
1
vote
1 answer

Open and close JavaFx apps in scala console

Here is an example: /* * Copyright 2013 ScalaFX Project * All right reserved. */ package scalafx.ensemble.example.charts import scalafx.application.JFXApp import scalafx.scene.Scene import scalafx.collections.ObservableBuffer import…
qed
  • 22,298
  • 21
  • 125
  • 196
1
vote
0 answers

Computer becomes unresponsive when dragging one ScalaFX window and simultaneously opening another

I am working on a ScalaFX application using multiple windows. However, if I drag one ScalaFX window around while another window is in the process of opening, the entire desktop becomes unresponsive. When this occurs, most applications do not respond…
Xylotrope
  • 81
  • 5
1
vote
0 answers

how to control Javafx scalafx FXyz 3D shapes

I have the following test code where I have a ClothMesh (from FXyz lib) that I can drag, rotate and drag my circle handles. All works well, FXyz is great. Now I want to use SegmentedSphereMesh, it mostly work except that my circle handles are 2D…
workingdog
  • 43
  • 4
1
vote
1 answer

ScalaFX i18n with fxml not working

First the working code: val root: BorderPane = new BorderPane(jfxf.FXMLLoader.load(getClass.getResource("/GUI/main.fxml"))) stage = new PrimaryStage() { title = "FXML Test" scene = new Scene(root) } No problem here. Now I wanted to add i18n…
user4063815
1
vote
1 answer

How to make a hole in a mesh using JavaFX JCSG and FXyz

I'm trying to understand the JCSG library by using the following test code, where I take the difference between a FXyz mesh/cloth and a sphere to create a hole in the mesh so as to display the underlying mesh image. Is it possible to do this, if…
workingdog
  • 43
  • 4
1
vote
1 answer

clipping of MeshView scalafx/javafx

I have the following test code, where I try to clip a MeshView with a circle. I also tried putting the meshView into a group then clipping that, but this result in a black circle. Is there a way to clip a MeshView, preferably without putting it…
workingdog
  • 43
  • 4
1
vote
1 answer

Issues with reading xml file after creating jar

We are building an application using ScalaFX. When I run the project in IntelliJIDEA, everything works fine. However, when I create jar file and try to execute it, I am getting errors in reading some xml file. I tried various solutions posted in…
Yadu Krishnan
  • 3,492
  • 5
  • 41
  • 80
1
vote
1 answer

scalafx.animation.Timeline not working as expected

I've started to try out the ScalaFX API few days ago. To learn the usage of this API I'm looking at the examples on GitHub. For testing out the features of the TimeLine class I used this example: ScalaFXAnimation. The code to define a TimeLine…
1
vote
1 answer

ScalaFX: looking up a SubScene always returns null

I have a ScalaFX App which contains a Stage with a Scene and a SubScene. All I want to achieve is to obtain a reference to the SubScene in another scope (a method to be precise) in order to change the content of the SubScene later on. My minimal…
ceran
  • 1,392
  • 1
  • 17
  • 43
1
vote
1 answer

How do I add components to a layout after it has become part of a scene?

The root layout in this case which has content... object SomeApp extends JFXApp { stage = new PrimaryStage { title = "SomeApp" width = 800 height = 600 val TheButton = new Button("Add a Button") { onAction = { e:…
1
vote
1 answer

JavaFX - get KeyEvent for non-ASCII characters

In a JavaFX (actually ScalaFX) application, I would like to allow the user to invoke commands by a sequence of keyboard keys. These commands should work regardless of the current keyboard layout (language). for example, the user may be typing in…
1
vote
0 answers

What is the implication of exportjars := true?

I've just started using an sbt plugin for packaging JavaFx/ScalaFx applications sbt-javafx. This under Java 7. While the plugin seems to work pretty well, it is not able to properly package multi-module project. A workaround they have found is to…
MaatDeamon
  • 9,532
  • 9
  • 60
  • 127
1
vote
2 answers

Custom Cells in TableView

I'm working on a scalafx project and I'd like a TableView where some of the Cells contain a button. I've found an example of how to put a graphic inside of a tablecell. When I use example and only replace the call to graphic = ... to use a button I…
user3346601
  • 1,019
  • 1
  • 11
  • 18
1
vote
1 answer

Invoke a java method which accepts `` type parameter from scala code?

I'm writing some scalafx code, which needs to invoke a method from java: val txtEditor = new TextArea { text = "markdown here" } txtEditor.text.addListener(new ChangeListener[String] { override def stateChanged(e: ChangeEvent): Unit =…
Freewind
  • 193,756
  • 157
  • 432
  • 708