java图形编程
PHP中文网
PHP中文网 2017-04-17 13:05:13
0
1
552

jfm.setLayout(new FlowLayout());
如果把这个布局换成
jfm.setLayout(new BorderLayout());
为什么在容器上就不能显示添加的组件呢?
是不是还要声明个面板JPanel呢?
将组件添加进容器使用的是
jfm.add(组件名称);

请教一下
想要弄成以下的样子

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
Ty80

How many components did you add to jfm?

BorderLayout defaults to layout child components at the BorderLayout.CENTER position of the parent component, so multiple components may be blocked. You can specify where each component is located.

About Java Layout Manager http://blog.sina.com.cn/s/blog_6f116c940101alna.html

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!