【发布时间】:2010-12-04 19:52:22
【问题描述】:
JPanel pMeasure = new JPanel();
....
JLabel economy = new JLabel("Economy");
JLabel regularity = new JLabel("Regularity");
pMeasure.add(economy);
pMeasure.add(regularity);
...
当我运行上面的代码时,我得到这个输出:
Economy Regularity
我怎样才能得到这个输出,每个 JLabel 都从一个新行开始?谢谢
Economy
Regularity
【问题讨论】:
标签: java swing jpanel jlabel layout-manager