diff --git a/AlgebraicDataflowArchitectureModel/src/application/editor/InputEventCellEditor.java b/AlgebraicDataflowArchitectureModel/src/application/editor/InputEventCellEditor.java index bad12b2..40591d7 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/InputEventCellEditor.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/InputEventCellEditor.java @@ -6,6 +6,7 @@ import java.util.EventObject; import java.util.HashMap; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Set; @@ -144,7 +145,17 @@ if (ret == JOptionPane.OK_OPTION) { JPanel inputEvent = new JPanel(); - JTextArea textArea = new JTextArea(eventMessages.get(0).toString(), 10, 30);//EventInput + int i , eventNum; + i = eventNum = 0; + + for(String eventString : eventList) { + if(eventString.equals(event.getSelectedItem().toString())) { + eventNum = i; + } + i++; + } + + JTextArea textArea = new JTextArea(eventMessages.get(eventNum).toString(), 10, 30);//EventInput inputEvent.add(textArea); int approve = JOptionPane.showConfirmDialog(null, inputEvent, "Event Code", JOptionPane.OK_CANCEL_OPTION);