Which layout is suitable for positioning components on a JFrame and making them stay where they have been placed? I don’t want controls to move around on resizing.
Which layout is suitable for positioning components on a JFrame and making them stay
Share
I suggest that you don’t use null layout and that you don’t fix your components in absolute position, not unless you want to have very ugly GUI’s that are difficult or impossible to use in various operating systems and screen resolutions. Much better is to not even set any sizes but rather to nest layout managers and let the managers set preferred and appropriate sizes by calling pack on your top-level window (the JFrame) after adding all components.