Only one component shows up in JFrame
The content pane of a JFrame has a BorderLayout. If you place a component in a BL with no constraints it ends up in the CENTER. The center can only display one component. For an immediate effect, I suggest: f.add(top, BorderLayout.PAGE_START); f.add(mid); f.add(bot, BorderLayout.PAGE_END); Other points. Take out f.setSize(500, 500); and call pack() immediately before … Read more