sda*_*das 1 java swing flowlayout
为什么我的组件不使用FlowLayout包装在这个JPanel中?它们只是在屏幕上运行,只是部分可见.
JPanel panel = new JPanel(new FlowLayout());
panel.add(new JLabel("TEST"));
// ... repeat adding JLabels until they go off screen when they SHOULD wrap
// to the next line...
Run Code Online (Sandbox Code Playgroud)
这是我的全部代码(除了添加和打包框架).我误解了FlowLayout吗?我是否必须在标签或面板上设置某种尺寸?
| 归档时间: |
|
| 查看次数: |
5822 次 |
| 最近记录: |