about GridBagLayout
When I am working with GridBagLayout and using weightx and weighty constraints the components are arranging automatically in new positions. How can overcome through this problem.Regards,Ch. S Ranga Reddy.
# 1
There's only one thing you need to know about GridBagLayout, and that's not to use it :o)I've never yet seen a scenario where GridBag is the appropriate choice. Though your question gives no indication of what you're trying to do or what the symptoms are anyway.
# 3
I don't dispute that it works, but it's difficult to learn and easy to get wrong - like you say, it's hard to handle. I've never once used it, never needed to.
Aside from the fact that properly designed UIs don't actually need such complex layout managers all that often, when they do, why use something that's hard to handle when there's something that's equally powerful but easy to handle?
https://tablelayout.dev.java.net/