java swing JPanel添加在JScrollPane上,有垂直的滚动条,可是滚动条拉到底,只显示了JPanel的一部分。如下面两张图所示,创建了100个主机的参数,结果只能显示到第52个。
[img]http://dl2.iteye.com/upload/attachment/0099/3681/6f464744-7e83-352a-8009-4c97680c3e65.png[/img]
[img]http://dl2.iteye.com/upload/attachment/0099/3683/48bb3adf-1d20-3d89-86fe-f05c593618de.png[/img]
有人建议“把要放的JPanel实现Scrollable接口。”,想问一下JPanel如何实现Scrollable接口?