title: How to add a JButton Button to the view
body: <p>This is a minimalist example of my problem so, please do not tell me that the class is useless and that I can do it with only a JPannel in my main class. Thanks.</p>
  
  <p>How do I add a <code>JButton</code> with text in the <code>EcranAcceuil</code> class below?</p>
  
  <pre><code>import java.awt.*;
  import javax.swing.*;
  
  public class jeu {
      public static void main(String[] args) {    
          // debut definition fenetre    
          JFrame fenetrejeu = new JFrame();    
          fenetrejeu.setTitle("QUEST");
          fenetrejeu.setSize(1000, 1000);
          fenetrejeu.setLocationRelativeTo(null);
          fenetrejeu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          fenetrejeu.setContentPane(new EcranAcceuil());
          fenetrejeu.setVisible(true);
      }
  }
  </code></pre>
  
  <p><strong>EcranAcceuil</strong></p>
  
  <pre><code>import java.awt.*;
  import java.io.File;
  import java.io.IOException;
  import javax.imageio.ImageIO;
  import javax.swing.JPanel;
  
  public class EcranAcceuil extends JPanel {
      public void paintComponent(Graphics g) {
          g.setColor(Color.BLACK);
          g.fillRect(0, 0, this.getWidth(), this.getHeight());
      }
  }
  </code></pre>