I have panel that is using group layout to organize some label. I want to keep this panel center of the screen when re sized. If i put the panel inside a another panel using flow layout i can keep the labels centered horizontally but not vertically. Which layout manager will allow me to keep the panel centered in the middle of the screen?
I also tried border layout and placed it in the center but it resizes to the window size.
Try using a
GridBagLayoutand adding the panel with an emptyGridBagConstrantsobject.For example: