diff options
author | Jonas Smedegaard <dr@jones.dk> | 2025-04-28 17:45:08 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2025-04-28 17:45:08 +0200 |
commit | c62b03b4b35972d7ed18069645bae96de2fb142a (patch) | |
tree | 1527605f926140881a1133bc2522802ded4eb03c /src/com.example.portfolio2 | |
parent | 770caee1a9d829b96e2a5cf571e4aac162d7fe74 (diff) |
define parameterized type for ComboBox (not later cast type)
Diffstat (limited to 'src/com.example.portfolio2')
-rw-r--r-- | src/com.example.portfolio2/com/example/portfolio2/Controller.java | 4 |
1 files changed, 2 insertions, 2 deletions
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<String> combo, TextArea textArea) { textArea.clear(); - for(String s : model.getParticipation((String) combo.getValue())) { + for(String s : model.getParticipation(combo.getValue())) { textArea.appendText(s + "\n"); } } |