JButton helloButton = new JButton("Say Hello");
Container contentPane = frame.getContentPane(); container.setLayout(new FlowLayout());
contentPane.add(helloButton);