简体   繁体   中英

JAVA GUI Layout - what is best layout for 6 buttons placed vertically with spaces?

I have been recently creating some GUI's for my program. However for my next GUI I want to know what is the best way to create a frame as follows:

It will have a title, Hotel Menu and then under it I want it to have 6 buttons placed vertically with spaces in between them. Wondering what is the best layout I can use to achieve such a thing?

I have used box layout before, but the buttons were uneven sizes and stuck together.

What IDE you are using?! You can use NetBeans as IDE, it has the advantage of the classical "click-and-drag" GUI design. Else, if you want to manually write the coding, the best way is to use Grid Layout. You can read more about it here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM