title: How do you add a button on top of a picture in jpanel
body: <pre><code>import java.awt.*;   
  import javax.swing.*;  
  
  public class Game
  {  
  
    MyDrawPanel draw;  
  
    public static void main(String[] args)
    {  
      new Game().go();   
    }  
  
    public void go()
    { 
      JFrame frame=new JFrame("Revenge");  
      JPanel panel=new JPanel();  
      draw=new MyDrawPanel();         
      frame.getContentPane().add(BorderLayout.CENTER,draw);  
      frame.setSize(750,360);  
      frame.setVisible(true);    
    }  
    public class MyDrawPanel extends JPanel
    {  
      @Override
      public void paintComponent(Graphics g)
      {              
        Image image=new ImageIcon("C:\\Users\\zep\\Desktop\\title.png").getImage();  
        g.drawImage(image,0,0,this);
      }  
    }  
  }  
  </code></pre>
  
  <p>So basically I need help trying to add a button. I am extremely new to java and I need to do this for my CPT in my class. Please help you will be my hero :3 </p>