private Map<String,String> m = new HashMap<String,String>();
public TextArea() {
m.putAll(Countries.capitals());
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
for(Map.Entry me : m.entrySet())
t.append(me.getKey()+ ": "+me.getValue()+"\n");
}
});m.putAll(Countries.capitals());说这句有问题,请大家帮忙解决,谢谢了!
import static net.mindview.util.SwingConsole.*;