title: Makes two JPanels when I only need one
body: <pre><code>package Rectangle;
  import java.awt.*;  
  import javax.swing.*;
  
  public class Rectangle extends JFrame { 
  
  
    public Rectangle(String arg) { 
  
        JPanel panel = new JPanel(); enter code here
          panel.setBackground(Color.BLACK); 
          ImageIcon icon = new ImageIcon(this.getClass().getResource("1676858-livingforest2011.jpg")); 
          JLabel label = new JLabel(); 
          label.setIcon(icon); 
          panel.add(label);
          this.getContentPane().add(panel); 
  
        }
            public static void main(String[] args) {
            Rectangle forestFrame = new Rectangle(args.length == 0 ? null : args[0]);
            forestFrame.setSize(1698,770);
            forestFrame.setVisible(true); 
            new Rectangle("/Users/computerscience2/Desktop/2njk8eq.png").setVisible(true);
  
  
  
        }
      }
  </code></pre>
  
  <p>It prints out two Jpanels, one that I want and one that I don't. It also prints out the one that I want the size that I want and the second one is the smallest it can be. How do I get rid of the second Jpanel?</p>