Java swing GUI tutorial #17: GridLayout

preview_player
Показать описание
In this tutorial I'll explain how to use GridLayout. And when it comes to using layout managers (not just GridLayout):

- DO NOT call setMinimumSize(), setMaximumSize() or setPreferredSize() methods for components within containers. Let some other factors to determine size of your component (like size of font or size of icon);

- Avoid calling setSize() method for top level standalone containers, like JFrame, call pack() instead, so the size of your JFrame will be equal to its preferred size, which is determined by size of components within your JFrame;

If you have any question, leave it in comment section below.
Рекомендации по теме
Комментарии
Автор

I want to have to panel in the center with girdlayout but it doesn't work it is only show one of the panel girdlayout

Zelkamel
Автор

What do you mean by that? I don't understand your question quite good.

OverG
Автор

how i can do that container inside container

RaoOora