如何在swing 中JTable中添加水平滚动条

2025-01-25 09:25:06
推荐回答(1个)
回答1:

JTable jt=new JTable();JScrollPane jsp=new JScrollPane(jt,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS,ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER );