Quantcast
Viewing latest article 3
Browse Latest Browse All 6

Answer by ebeprogrammer for Java gui layout

you could use a BoxLayout and in the constructor set the layout type to Box.Y_AXIS, and with this all of the widgets will fall under the previous one added, OR you could still use the GridLayout but add each individual widget to its own JPanel before adding that JPanel to the GridLayout, that will prevent the oversizing problem that you would normally have, and btw you dont have to store any reference to the JPanel's just instantiate, add a widgets, and add the panel until all widgets are taken care of


Viewing latest article 3
Browse Latest Browse All 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>