private void updateTracesCombo(BehavioralAnnotation behavioralAnnotation) { this.traces.clear(); Iterator<Trace> traceIter = behavioralAnnotation.iteratorOfTraces(); while (traceIter.hasNext()) { Trace trace = traceIter.next(); this.traces.put("Method call sequence " + trace.getId(), trace); } List<String> list = new ArrayList<String>(this.traces.keySet()); Collections.sort(list); this.tracesCombo.setItems( list.toArray((String[]) Array.newInstance(String.class, list.size()))); if (list.size() > 0) { this.tracesCombo.select(0); updateTrace(this.traces.get(list.get(0))); } }