I want to make a JPanel (with GridLayout) that contains a grid of custom components. All is ok, but I have problem with the components size. The components size each time grows or diminishes so the total dimension of all the components fills the JPanel‘s region. I want the internal components have a standard size, and if the total dimension of all components is smaller than JPanel‘s dimension then leave it empty, or if the total dimension is bigger than the JPanel‘s region then use the scrollpane.
I want to make a JPanel (with GridLayout ) that contains a grid of
Share
Use GridBagLayout instead. Or you can try to override the GridLayout’s methods