开发者

Set position of JTextField, JLabel and JButton in Java

When i run the program, the label textfield and button and so on are arranged randomly (label and button are in same li开发者_Python百科ne).

How do I explicitly set the layout?


which technology do you use? Java Swing? Then I can recommend you the following manual:

http://download.oracle.com/javase/tutorial/uiswing/layout/using.html#set

You should work with so called "Layout Managers", which support you in arranging different labels, fields and so on.

greets


Try to use the setBounds(x,y,length,heigth) and setLayout(null). So you can set its coordinates.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜