我有一个城市列表。当您单击一个城市时,它会显示该城市的当前时间、日期等
但是,它仅在我双击城市时才会更新我将如何将其更改为单击
谢谢
@Override
public void itemStateChanged(ItemEvent e)
{
Set<String> countries = regionMap.get(listRegion.getSelectedItem());
listSubRegion.removeAll();
for(String country : countries)
{
listSubRegion.add(country);
}
selectedRegion = listRegion.getSelectedItem();
listSubRegion.validate();
listSubRegion.repaint();
repaint();
}