title: CardLayout class can't open
body: <p>I am attempting to add opening cover in my program. So I use a card layout.</p>
  
  <pre><code>import java.awt.*;
  import java.awt.event.*;
  import java.util.Random;
  import javax.swing.*;
  import java.lang.Object;
  import java.io.*;
  import sun.audio.*;
  import java.net.URL;
  import javax.sound.sampled.*;
  import java.applet.*;
  import java.util.*;
  
  public class Game extends JFrame{
      public static CardLayout cl = new CardLayout();
      public static JPanel dasar = new JPanel(cl);
  public Game() {
          dasar.add(new Opening(),"Opening");
          dasar.add(new level1(),"Level 1");
          dasar.add(new level2(),"Level 2");
          dasar.add(new level3(),"Level 3");
          dasar.add(new level4(),"Level 4");
          add(dasar,BorderLayout.CENTER);
          /*KeyboardListener listener = new KeyboardListener();
          opening();
          addKeyListener(listener);*/    
      }
  
      public static void main(String [] args){
          Game G = new Game();
          G.setTitle("PuzzleGame");
          G.setSize(800,550);
          G.setLocationRelativeTo(null);
          G.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          G.setVisible(true);
      }
  }
  </code></pre>
  
  <p>and I make a opening class like this:</p>
  
  <pre><code>class Opening extends JPanel{
  public Opening(){
      AudioClip AudioOp = Applet.newAudioClip(this.getClass().getResource("opening.wav"));
  
      JLabel atasan = new JLabel(new ImageIcon(getClass().getResource("TOP.png")));
      JLabel bawahan = new JLabel(new ImageIcon(getClass().getResource("btm.png")));
      JLabel nama = new JLabel(new ImageIcon(getClass().getResource("namakelompok.png")));
      JLabel background = new JLabel(new ImageIcon(getClass().getResource("background.jpg")));
  
      JPanel panel1 = new JPanel();
      panel1.setLayout(null);
      panel1.add(atasan);
      panel1.add(bawahan);
      panel1.add(nama);
      panel1.add(background);
      add(panel1);
      background.setBounds(0,0,800,550);
      atasan.setBounds(100,50,600,100);
      bawahan.setBounds(232,450,336,46);
      nama.setBounds(194,180,411,205);
  }
  }
  </code></pre>
  
  <p>Why when I compile this program cant show anything? it's like blank window
  give me a suggestion. Sorry, I'm a beginner. </p>