如何在JList组件中,把一个TreeMap所有的Key值列出来?
------解决方案--------------------
遍历....加入数组...
- Java code
TreeMap<String,String> map = new TreeMap<String, String>(); String[] keyList = map.keySet().toArray(new String[map.size()]);
TreeMap<String,String> map = new TreeMap<String, String>(); String[] keyList = map.keySet().toArray(new String[map.size()]);