在面板顶部留下间隙 [英] leaving gap from top in panel
本文介绍了在面板顶部留下间隙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我从 netbeans 中截取了这个快照.从 jpanel 添加垂直间隙的方法是什么?(即从面板到第一个组件的垂直间隙)
I have taken this snapshot from netbeans.what is the method to add vertical gap from jpanel ? (i.e vertical gap from panel to the first component )
推荐答案
有几种方法.要么让布局管理器处理它,要么使用 BorderFactory.createEmptyBorder
.
There are several ways. Either you let the layout manager take care of it, or you could use a BorderFactory.createEmptyBorder
.
这篇关于在面板顶部留下间隙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文