jlist.addListSelectionListener(
      new ListSelectionListener() {      
      public void valueChanged(ListSelectionEvent listevt) {
        
        if (a == 0) {//不判断就会执行两次
          new OpenFrame();
          Object[] values = jlist.getSelectedValues();
          StringBuffer text = new StringBuffer();
          for (int i = 0; i < values.length; i++) {
            ListItem li = (ListItem) values[i];
            //我发现用户对List的选项每选一次,就打印两次
            System.out.println("li.getValue():" + li.getValue()); //获得的值
            String strColor = li.toString(); //显示,给用户看的
            text.append(strColor);
            text.append(" ");
          }
          jlabel.setText(text.toString());
         
        }
         a = a == 0 ? 1 : 0;
      }
    }
    );
private static  int a = 0;可能进行事件切换都是这样吧,还将测试