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 scalafx.scene.Scene import scalafx.scene.paint.Color class Graph { val app = new JFXApp { stage = new JFXApp.PrimaryStage { title = "First GUI" scene = new Scene { fill = Color.Coral } } } def getTitle() = { app.stage.getTitle } def generateChart(args: