Newer
Older
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.TextArea;
@FXML
private TextArea textArea;
@FXML
private void handleSubmit() {
//create new thought, parameter from textArea
Thought t = new Thought(textArea.getText());
//clear textArea
textArea.clear();
//get the thought manager and add the thought to the manager
ThoughtManager tm = ThoughtManager.getInstance();
tm.add(t);