Java swing GUI tutorial #17: GridLayout

Published: 25 February 2013
on channel: Lazic B.
56,555
168

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.
Source codes available here: https://github.com/BranislavLazic/Swi...


On this page of the site you can watch the video online Java swing GUI tutorial #17: GridLayout with a duration of 05 minute 33 second in good quality, which was uploaded by the user Lazic B. 25 February 2013, share the link with friends and acquaintances, this video has already been watched 56,555 times on youtube and it was liked by 168 viewers. Enjoy your viewing!