开发者

java JTable cell change

开发者 https://www.devze.com 2023-02-15 16:43 出处:网络
I have a java JTable, when users click a cell, it will change to a dropdown or textField, users can make chan开发者_JS百科ge. Then users can click a save button, that cell will go back a label.

I have a java JTable, when users click a cell, it will change to a dropdown or textField, users can make chan开发者_JS百科ge. Then users can click a save button, that cell will go back a label.

How to implement this ? a simple example will be better.

Thanks.


A good starting point for such questions is Sun/ Oracle's tutorial:

http://download.oracle.com/javase/tutorial/uiswing/components/table.html

Have a look at cell renderers, cell editors, table models and events.

0

精彩评论

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

关注公众号