Putting JComboBox into JTable

前端 未结 9 1298
离开以前
离开以前 2020-11-30 10:22

I want to put individual JComboBoxes into each cells of a JTable. ie. The JComboBox content is not identical for each cell.

I basically would like to be able to jus

9条回答
  •  忘掉有多难
    2020-11-30 10:50

    The JComboBox content is render identical for each row selection because the JTable does not offer the capability to have more than one editor per column. You have to extend the JTable class to support an additional selection for rows.

    This article explains it very well: http://www.javaworld.com/javaworld/javatips/jw-javatip102.html

提交回复
热议问题