-
-
Save TomasMikula/13ebd2c1e1dfcb7d4a8a to your computer and use it in GitHub Desktop.
[RT-36130] NPE at javafx.scene.text.Text.getSpanBounds(Text.java:292)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
apply plugin: 'application' | |
sourceCompatibility = '1.8' | |
mainClassName = 'Main' | |
repositories { | |
mavenCentral() | |
maven { | |
url "https://oss.sonatype.org/content/repositories/snapshots" | |
} | |
} | |
dependencies { | |
compile "org.jfxtras:jfxtras-labs:8.0-r2-SNAPSHOT" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javafx.application.Application; | |
import javafx.scene.Scene; | |
import javafx.scene.text.Text; | |
import javafx.scene.text.TextFlow; | |
import javafx.stage.Stage; | |
import jfxtras.labs.scene.control.window.Window; | |
import jfxtras.labs.scene.layout.ScalableContentPane; | |
public class Main extends Application { | |
public static void main(String[] args) { | |
launch(args); | |
} | |
@Override | |
public void start(Stage primaryStage) { | |
ScalableContentPane root = new ScalableContentPane(); | |
Scene scene = new Scene(root, 800, 600); | |
TextFlow textFlow = new TextFlow(new Text("The Code")); | |
Window w = new Window("Editor"); | |
w.getContentPane().getChildren().add(textFlow); | |
root.getContentPane().getChildren().add(w); | |
primaryStage.setScene(scene); | |
primaryStage.show(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Download both files and place
Main.java
undersrc/main/java
.Run
gradle run
to execute.