I have made a JFrame and inside that frame, there is panel on which I have placed various containers using GridBagLayout. I have set layout of JFrame to be BorderLayout, and added panel in BorderLayout.WEST. I want to show that panel’s containers at the top left corner. How can I do that?
Even if I try to add panel to BorderLayout.NORTH then also it is displayed in top center but instead I want to be in top left corner.
Is there any way to do that? I.E. any other layout I should use as I want to show
label1
button1 button2 button3
label2
button1 button2 button3
label 3
button1 button2 button3
This is easy to do with just
GridLayoutandBorderLayout.