开发者

BeansBinding in JTable and JTable's TableColumn

One of my JTable is update with a bean property(util.List).It is ok. But I want a column in my JTable named "Action". This column should have JComboBox for each row to do some thing for that row's data. I read this and it has some tutorials how to set a Jcombobox into a JTable row.

I use NetBeans IDE for coding. In the netbeans "Table Content" of the JTable display box under the Column tab, there are properties to set our JTable. I added a column for my "action" then set j开发者_StackOverflow中文版avax.swing.table.TableCellEditor as new DefaultCellEditor(comboBox) in "Editor" Options. Here I added a JComboBox combobox for the cell editor. But when I ran the project, there is no any combo box but only a text "Object" .(I had use Object as the Exression type of the column)

Any one tell me how can I insert a JCombobox into a JTable cell when JTable is bound to a beans propery . specially in NetBeans


you forget to set DefaultCellEditor for that

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜