From c62b03b4b35972d7ed18069645bae96de2fb142a Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 28 Apr 2025 17:45:08 +0200 Subject: define parameterized type for ComboBox (not later cast type) --- src/com.example.portfolio2/com/example/portfolio2/Controller.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/com.example.portfolio2/com/example/portfolio2/Controller.java') diff --git a/src/com.example.portfolio2/com/example/portfolio2/Controller.java b/src/com.example.portfolio2/com/example/portfolio2/Controller.java index ad81b5f..031b6cc 100644 --- a/src/com.example.portfolio2/com/example/portfolio2/Controller.java +++ b/src/com.example.portfolio2/com/example/portfolio2/Controller.java @@ -64,9 +64,9 @@ class Controller{ } // Clears the text area and adds all activity names from activities in participation - void updateArea(ComboBox combo, TextArea textArea) { + void updateArea(ComboBox combo, TextArea textArea) { textArea.clear(); - for(String s : model.getParticipation((String) combo.getValue())) { + for(String s : model.getParticipation(combo.getValue())) { textArea.appendText(s + "\n"); } } -- cgit v1.2.3