Skip to content
Snippets Groups Projects
Commit 7945090c authored by Anders Langlie's avatar Anders Langlie 🦀
Browse files

Merge branch '6-display-list' into 'master'

Resolve "Display list"

Closes #6

See merge request !9
parents 196f19b6 864f6114
No related branches found
No related tags found
1 merge request!9Resolve "Display list"
...@@ -13,6 +13,8 @@ public class Main extends Application { ...@@ -13,6 +13,8 @@ public class Main extends Application {
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml")); Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
primaryStage.setTitle("Hurl your thoughts"); primaryStage.setTitle("Hurl your thoughts");
primaryStage.setScene(new Scene(root, 700, 498)); primaryStage.setScene(new Scene(root, 700, 498));
ThoughtManager tm = new ThoughtManager();
tm.makeList();
primaryStage.show(); primaryStage.show();
} }
......
package sample; package sample;
public class Thought { public class Thought {
private String thoughtText; public String thoughtText;
public Thought(String txt){ public Thought(String txt){
thoughtText = txt; thoughtText = txt;
......
...@@ -3,5 +3,24 @@ package sample; ...@@ -3,5 +3,24 @@ package sample;
import java.util.List; import java.util.List;
public class ThoughtManager { public class ThoughtManager {
private List<Thought> thoughts; public List<Thought> thoughts;
public void makeList()
{
Thought t = new Thought();
t.thoughtText = "yeet";
Thought t2 = new Thought();
t2.thoughtText = "yeet1";
Thought t3 = new Thought();
t3.thoughtText = "yeet2";
Thought t4 = new Thought();
t4.thoughtText = "yeet3";
Thought t5 = new Thought();
t5.thoughtText = "yeet4";
this.thoughts.add(t);
this.thoughts.add(t2);
this.thoughts.add(t3);
this.thoughts.add(t4);
this.thoughts.add(t5);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment