如何使JScrollPane适合我的jTable? [英] How to make JScrollPane fit to my jTable?

查看:116
本文介绍了如何使JScrollPane适合我的jTable?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与JTable一起使用时,JScrollPane出现问题.如何使scrollPane在JTable下没有空白,如图片所示

I have a problem with JScrollPane when it is used with JTable. How can I make it such that the the scrollPane doesn't have a blank space below the JTable as can be seen in the picture

此外,我目前正在使用JTabPane,该JTabPane包含2个JPanel,一个用于JScrollPane,一个用于底部的JList.这是做事的正确方法吗?

Also,I am currently using a JTabPane that contains 2 JPanels, one for the JScrollPane and one for the JList at the bottom. Is this the right way to do things?

推荐答案

方法此处提及>,在这种情况下可能会有用.

The method setPreferredScrollableViewportSize(), mentioned here, may be useful in this context.

这篇关于如何使JScrollPane适合我的jTable?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆