且构网

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

将JTable动态添加到JScrollPane

更新时间:2023-01-26 14:54:23

您不应将组件添加到JScrollPane,而应添加到其JViewport:

You should add component not to JScrollPane but to its JViewport:

scrollPane.getViewport ().add (table);