Newer
Older
package sample;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.text.Text;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
Scene sceneMain = new Scene(root, 700, 498);
primaryStage.setScene(sceneMain);
ScrollPane scrollyPlane = (ScrollPane) sceneMain.lookup("#scrollyboi");
Node content = scrollyPlane.getContent();
Text ourTextField = (Text) content.lookup("#thoughtId");
ThoughtManager tm = ThoughtManager.getInstance();
//NOTE! if you reinitalize ThoughtManager it will just change where it will be writing to:
tm.initialize(ourTextField);
}
public static void main(String[] args) {
launch(args);
}
}