I want to have 9 JPanel
components on a JFrame
and have 4 JButton
components on each panel. But after adding 9 panels, 8 of them disappear.
Anyone can help me to correct this?
JFrame
uses a BorderLayout
by default, you may wish to consider using a different ones, compounding them to achieve your desired results. See Laying Out Components Within a Container for more details.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.