import javax.swing.*; import java.awt.*; public class MyFrame extends JFrame { public MyFrame () { super ("Mein Fenster"); Container rootContainer = getContentPane(); FlowLayout flow = new FlowLayout(FlowLayout.LEFT, 10, 20); rootContainer.setLayout(flow); for (int i=0; i<15; i++) { JLabel label = new JLabel("Label" + i); rootContainer.add(label); } } public static void main (String args[]) { JFrame frame = new MyFrame(); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.setSize(300,400); frame.show(); } }