简体   繁体   中英

How do you use gridbaglayout in java?

How do you use grid bag layout? What does it mean with all of the pady and all of that. there are no tutorials properly online.

Did you really search? This is a good one (and btw from official sources)

I'm not quite sure about gridbaglayout but gridlayout is quite easy. You just say

frame.setLayout(new GridLayout(number of rows, number of columns, spacing, spacing from     top));

like that.

You could also set the layout to null and manually place it using the setBounds(x, y, length, height) method

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