Forums Register Login

Insets purpose??

+Pie Number of slices to send: Send
What is the purpose of the GridBagContraints Insets class and how is it
used?

Thanks.
+Pie Number of slices to send: Send
Well, the documentation for the class says

"An Insets object is a representation of the borders of a container. It specifies the space that a container must leave at each of its edges. The space can be a border, a blank space, or a title."
+Pie Number of slices to send: Send
Better yet is GridBagConstraints documentation on how it uses Insets:

This field specifies the external padding of the component, the minimum amount of space between the component and the edges of its display area.



Given GridBagConstraints g, any component added using g will have g.insets.top and g.insets.bottom added to it's preferred height and g.insets.left and g.insets.right added to it's preferred width when determining it's display area. It's display area in the case of a GridBagLayout is the size of it's cell. Note that other components in the same row or column may affect the cell's width or height as well.
Once upon a time there were three bears. And they were visted by a golden haired tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 760 times.
Similar Threads
confusions
Invisible Popup
Radio Button Alignment
WA #2 ..... word association
Re:insets(GridBagLayout)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:30:28.