A Table like JTreeTable with editable components like ComboBox, TextArea, CheckBox as Rows

我只是一个虾纸丫 提交于 2019-12-06 05:31:21

问题


Is there any custom plugin(like JTreeTable with editable java components) in java, like in the above image.

I know this can be done by Extending JTreeTable or JXTreeTable Class or using TreeCellEditor etcetera... But, I need a quite exact structure like shown in the above image, Please guide me and Thanks in advance.


回答1:


Outline, seen here and here, uses the same renderer and editor schema as JTable. For example, to get a column of checkboxes, your RowModel implementation of getColumnClass() should return Boolean.class and your implementation of isCellEditable() should return true for the Logical2 column. I haven't tried it, but DefaultCellEditor, instantiated with a JCheckBox, should work for the combo column.



来源:https://stackoverflow.com/questions/25530463/a-table-like-jtreetable-with-editable-components-like-combobox-textarea-checkb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!