本帖最后由 wea56567 于 2013-06-24 10:23:33 编辑

解决方案 »

  1.   

    运行的时候报错
    Exception in thread "AWT-EventQueue-1" java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.util.Vector
    求原因
      

  2.   

    你content里面为什么要
    content.addAll(map.values());
    也就是里面是
    map.put(1, 1);
    map.put(2, "启用");
    map.put(3, "连接");
    map.put(4, "6h");
    map.put(5, "启用");
    的value值,
    然后(Vector) content.get(row)
    把"启用",true 什么的再转成Vector?什么逻辑啊???
      

  3.   

    @flagiris 
    content.addAll(map.values());
    是为了添加数据到表格
    (Vector) content.get(row)
    转成Vector是为了实现remove方法啊
      

  4.   

    @flagiris 
    content.addAll(map.values());
    是为了添加数据到表格
    (Vector) content.get(row)
    转成Vector是为了实现remove方法啊 
      

  5.   

    map.put(5, true);改为
    map.put(5, "true");
      

  6.   

    报错:java.lang.String cannot be cast to java.util.Vector
    我觉得应该是我用map添加数据的问题,但不知道怎么改
      

  7.   

    content.get(row)结果就是string类型的,当然转 不了
      

  8.   


    逻辑有问题,你怎么把"启用",true这些String,boolean型的数据强制转成Vector型呢,
    肯定要报错的啊
      

  9.   

    但是如果不这样写,写成content.remove(row);的话,修改完数据之后就是直接修改一列的数据
      

  10.   


    逻辑有问题,你怎么把"启用",true这些String,boolean型的数据强制转成Vector型呢,
    肯定要报错的啊那重么才能改好额
      

  11.   


    逻辑有问题,你怎么把"启用",true这些String,boolean型的数据强制转成Vector型呢,
    肯定要报错的啊那重么才能改好额那得你自己理解清楚业务,
    先别着急写,理清思路就好写了。
    总之Vector里存什么你才成取什么,
    你存String怎么可能取出Vector呢。