Q: Java Pong ball and racket aren't visible i want to make a pong game. 
The movement of ball and rackets works fine. But when i add a panel with some Buttons(the Buttons are for game control for example "start game" to the frame the Gamethread starts but the ball and the rackets aren't visible. The Panel with the Butttons and the Gamepanel is visible.
How can I fix that? 
public class Pong extends JFrame  {

    JPanel Buttons= new JPanel();
    JPanel Test = new JPanel(); 
    GameThread gamethread;
    JPanel GamePanel = new JPanel();

    int x = 30; // Anfangskoordinaten Schläger 1
    int y = 260;
    int Px = 100, Py = 100; // Anfangskoordinaten Ball
    int x2 = 570, y2 = 260; // Anfangskoordinaten Schläger 2
    int dPx = 10, dPy = 10; // Geschwindigkeit Ball
    boolean Spieler1o = false; // Pfeiltaste oben am Anfang Taste nicht gedrückt
    boolean Spieler1u = false; // Pfeiltast unten
    boolean Spieler2o = false;
    boolean Spieler2u = false;

    static boolean start=false;

    public Pong() {                 
        JFrame frame = new JFrame();
        frame.setSize(800, 800);            
        frame.setFocusable(true);
        frame.setLayout(new FlowLayout());                  
        frame.add(GamePanel,new GamePanel());
        frame.add( Buttons,new Buttons());
        frame.setVisible(true);

    }

    class Buttons extends JPanel implements ActionListener { 
        JButton button1 = new JButton("Pause");
        JButton button2 = new JButton("Start Computer");
        JButton button3 = new JButton("Start Multiplayer");
        JButton button4 = new JButton("Beenden");

        Buttons() {
            setPreferredSize(new Dimension(100, 100));
            Buttons.setBackground(Color.YELLOW);
            Buttons.setLayout(new FlowLayout());
            button1.addActionListener(this);
            button2.addActionListener(this);
            button3.addActionListener(this);
            button4.addActionListener(this);

            Buttons.add(button1);
            Buttons.add(button2);
            Buttons.add(button3);
            Buttons.add(button4);
        }

        @Override
        public void actionPerformed(ActionEvent e) {                    
        }
    }           

    class GamePanel extends JPanel { // draw ball and rackets
        GamePanel(){
            GamePanel.setPreferredSize(new Dimension(600,600));          
            GamePanel.setBackground(Color.YELLOW);           
            gamethread = new GameThread();
            gamethread.start();          
        }

        public void paint(Graphics gr) { // beiden Schläger und Ball
            super.paint(gr);
            Graphics2D g = (Graphics2D) gr; // werden gezeichnet
            g.setColor(Color.YELLOW);
            g.fill(g.getClipBounds()); 
            g.setColor(Color.BLACK);
            g.fillRect(x, y, 10, 80); // Ball und Schläger werden gezeichnet
            g.fillOval(Px, Py, 30, 30);
            g.fillRect(x2, y2, 10, 80);
        }
    }

    class GameThread extends Thread implements KeyListener {   
        GameThread() {  
            addKeyListener(this);
        }                       

        public void run() {
            while(true) {

                TastaturEingabe();
                bewegeBall();
                repaint();              
                try {
                    Thread.sleep(50);
                    System.out.println("Test");
                } catch (InterruptedException e) {
                    return;
                }
            }
        }

        public void bewegeBall() {
            Px = Px + dPx; // die Bewegung
            Py = Py + dPy;

            if (Px < 0) { // Ball prallt von der Wand ab
                Px = 0;
                dPx = -dPx;
            }
            if (Py < 0) { // Ball prallt von der Wand ab
                Py = 0;
                dPy = -dPy;
            }
            if (Py > 570) { // Ball prallt von der Wand ab
                Py = 570;
                dPy = -dPy;
            }
            if (Px > 570) { // Ball prallt von der Wand ab
                Px = 570;
                dPx = -dPx;
            }

            if (Px <= 40 && Py >= y && Py <= y + 80) { // Hier soll er vom Schläger1 abprallen
                Px = 40;
                dPx = -dPx;
            }

            if (Px >= 540  && Py >= y2 && Py <= y2 + 80) {
                Px = 540;
                dPx = -dPx;
                dPy = -dPy;
            }
        }

        public void TastaturEingabe() {
            if (Spieler1o == true) { // Bewegung Schläger1
                y -= 12;
            }
            if (Spieler1u == true) {
                y += 12;
            }
            if (Spieler2o == true) { // Bewegung Schläger2
                y2 -= 12;
            }
            if (Spieler2u == true) {
                y2 += 12;
            }

            if (y2 > 520) { // 600-80 wegen Schlägerlänge
                y2 = 520; // Damit die Schläger nicht aus dem Bild verschwinden
            }
            if (y2 < 0) {
                y2 = 0;
            }
            if (y < 0) {
                y = 0;
            }
            if (y > 520) {
                y = 520;
            }
        }

        @Override
        public void keyPressed(KeyEvent e) {
            if (e.getKeyCode() == KeyEvent.VK_W) {
                Spieler1o = true;
            }
            if (e.getKeyCode() == KeyEvent.VK_S) {
                Spieler1u = true;
            }

            if (e.getKeyCode() == KeyEvent.VK_UP) { // Spieler2 hier wird geguckt ob Taste gedrückt
                Spieler2o = true;
            }
            if (e.getKeyCode() == KeyEvent.VK_DOWN) {
                Spieler2u = true;
            }           
        }

        @Override
        public void keyReleased(KeyEvent e) {
            if (e.getKeyCode() == KeyEvent.VK_W) {
                Spieler1o = false;
            }
            if (e.getKeyCode() == KeyEvent.VK_S) {
                Spieler1u = false;
            }
            if (e.getKeyCode() == KeyEvent.VK_UP) {
                Spieler2o = false;
            }
            if (e.getKeyCode() == KeyEvent.VK_DOWN) {
                Spieler2u = false;
            }

        }

        @Override
        public void keyTyped(KeyEvent e) {
            // TODO Auto-generated method stub      
        }       
    }

    public static void main(String[] args) {
        new Pong();             
    }           
}   


A: There is too much wrong in your code to correct it all. But here are a few examples.
These fields
JPanel Buttons= new JPanel();
JPanel Test = new JPanel(); 
JPanel GamePanel = new JPanel();

are wrong and should be deleted. Firstly, don't give fields names starting with a capital letter, especially if that exact name is the name of a class. Even more especially when they are not assigned instances of the class they are named after.
Test is never used.
Buttons is not an instance of Buttons, just a new JPanel() (so it will show nothing).
GamePanel is not an instance of GamePanel, just a new JPanel() (so it will show nothing).
It looks like you had some compile errors and so you just started adding fields to your class until they went away.
If you want an instance of Buttons and GamePanel in your Pong class, you could have
Buttons buttons = new Buttons();
GamePanel gamePanel = new GamePanel();

Now they are actually using the classes you wrote, instead of a plain JPanel.
Secondly, your Pong class extends JFrame, but in its constructor you create another frame JFrame frame = new JFrame();. If Pong is supposed to be your frame, you need to be using that, not making another frame that you will lose all reference to when your constructor ends.
Then if you want to add something to your frame's content pane with a flow layout, you can do it like this:
public Pong() {
    setSize(800, 800);
    setFocusable(true);
    Container cp = getContentPane();
    cp.setLayout(new FlowLayout());
    cp.add(gamePanel);
    cp.add(buttons);
    setVisible(true);
}

