Ok I got it but... I need to make the layout translucent... I changed my code a bit :
I Created objects of class ball and pad I don't really know if it's a good idea tho!
import java.awt.*; import java.awt.Color; import java.awt.event.*; import javax.swing.*; public class arkanoidGame extends JFrame { FlowLayout layout = new FlowLayout(); ball theBall = new ball(); pad thePad = new pad(); JButton startButton = new JButton("Start Game"); private static final long serialVersionUID = 1L; public arkanoidGame(String name) { super(name); } public void addComponentsToPane(final Container pane) { final JPanel panel = new JPanel(); JPanel controls = new JPanel(); controls.setLayout(new FlowLayout()); panel.setLayout(null); controls.add(startButton); startButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { panel.validate(); panel.repaint(); } }); //pane.add(controls,BorderLayout.SOUTH); pane.add(theBall); theBall.setBounds(0,0,800,600); pane.add(thePad); thePad.setBounds(0,500,800,100); } private static void createAndShowGui() { arkanoidGame frame = new arkanoidGame("Arkanoid Game"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setSize(800,600); frame.setBounds(0,0,800,600); frame.addComponentsToPane(frame.getContentPane()); frame.setFocusable(true); frame.setFocusTraversalKeysEnabled(false); frame.setVisible(true); } public static void main(String[] args) { try { //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); } catch (UnsupportedLookAndFeelException ex) { ex.printStackTrace(); } catch (IllegalAccessException ex) { ex.printStackTrace(); } catch (InstantiationException ex) { ex.printStackTrace(); } catch (ClassNotFoundException ex) { ex.printStackTrace(); } UIManager.put("swing.boldMetal", Boolean.FALSE); javax.swing.SwingUtilities.invokeLater(new Runnable(){ public void run() { createAndShowGui(); } }); } }