过载grabFocus()获得焦点,super()后怎么办不用说了吧。

解决方案 »

  1.   

    用这个方法:  setRowSelectionInterval(int row0, int row1)选中从row0开始到row1结束的行
    给分么:)
      

  2.   

    嘿嘿,我只给方法,用起来环境也不同,也不知道楼主的table里面是什么咚咚阿,其实对很多你不了解方法的类可以在ide环境里查看一下都有哪些方法,根据名字大体判断一下,再看一看j源代码上附的说明,一般都知道怎么用了:如下说明
    /**
     * Selects the rows from <i>index0</i> to <i>index1</i> inclusive.
     *
     * @param   index0 one end of the interval.
     * @param   index1 other end of the interval
     */
    public void setRowSelectionInterval(int index0, int index1) {
    selectionModel.setSelectionInterval(index0, index1);
    }