且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法将JPanel中包装的JButton添加到JTable中

更新时间:2023-12-05 10:31:46

您不能将Swing组件添加到表中,因为不使用表来显示实际组件.

You can't add Swing components to a table because a table is not used to display actual components.

请参见表按钮列,其中提供了一种解决方案表格列中按钮的渲染器/编辑器.

See Table Button Column for one solution that provides the renderer/editor for a button in a column of the table.