From ce7c89d2434279644320263021bb803d8ea1cf91 Mon Sep 17 00:00:00 2001 From: Herman Andersen Dyrkorn <hermanad@stud.ntnu.no> Date: Sat, 29 Aug 2020 14:20:44 +0200 Subject: [PATCH] clearing textarea after pressed button --- src/sample/Controller.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sample/Controller.java b/src/sample/Controller.java index b37db9a..e95e47f 100644 --- a/src/sample/Controller.java +++ b/src/sample/Controller.java @@ -15,10 +15,15 @@ public class Controller { //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); tm.displayList(); + } } -- GitLab