我使用JTable中创建的表较小,但如你在图片中看到波纹管看起来比面板更小的...JTable中出现
代码
tableModel1 = new DefaultTableModel(data1,column_header1);
table_1 = new JTable(tableModel1);
JScrollPane scrollPane1 = new JScrollPane(table_1);
scrollPane1.setBounds(1, 1, 1050, 500);
panel_3.add(scrollPane1);
'panel_3'上的布局管理器是什么?它应该是'BorderLayout',你应该在'BorderLayout.CENTER'处添加滚动窗格。 –