title: My labels in an instanced object are disappearing
body: <p>***EDIT - I have removed all of the unnecessary code (I thought it might be useful for someone to see the steps I have taken to troubleshoot)</p>
  
  <p>I am having a very odd issue. I am instantiating an object with multiple swing objects but the jlabel on all but the very last instance disappears. They are all the same but only the the highest numbered array index has its label showing. But they all should be seen. I have verified that they are in the correct position and have the correct size and it is set to visible but I cannot figure out why this is happening. I have run the program on another computer and it had the same results. There are two classes only. It is a pretty simple program but I can't seem to figure this one out, can some run this code and let me know if it works? if not can someone identify the issue?</p>
  
  <pre><code>import java.io.*;
  import java.lang.*;
  import java.awt.*;
  import java.awt.event.*;
  import javax.swing.*;
  import javax.swing.event.*;
  
  public class sizer extends JPanel {
      public static int lhval = 10000;
      public static int lvval = 10000;
      public static int shval = 10000;
      public static int svval = 10000;
      public static String IDlbltxt = "0";
      public static int IDlblint = 0;
      static boolean DEBUG = true;
  
      public final static JLabel IDlbl = new JLabel( "0" );
  
      public sizer (int arg) {
          setLayout(null);
          setSize(91, 88);
          setVisible( true );
  
          IDlbltxt = Integer.toString(arg);
          IDlblint = arg;
  
          IDlbl.setHorizontalAlignment(SwingConstants.RIGHT);
          IDlbl.setLocation( 40 , 30 );
          IDlbl.setFont(new Font("Serif", Font.PLAIN, 18));
          IDlbl.setText( IDlbltxt );
          IDlbl.setVisible(true);
          IDlbl.setBorder( BorderFactory.createLineBorder(Color.black, 5) );
          IDlbl.setSize( IDlbl.getPreferredSize() );
          add( IDlbl );
  
  
          repaint();
      }
  
      public static void main(String[] args) {
          final JFrame frame = new JFrame( "sizer - gettin it sized" );
          frame.setLayout(null);
          frame.setSize(320, 260);
          frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
          frame.setVisible( true );
          frame.getContentPane().setBackground( Color.red );
  
  
          final sizer s1 = new sizer(0);
          s1.setLocation( 1, 1);
          frame.add(s1);
  
          frame.repaint();
      }
  }
  </code></pre>
  
  <p>here is the second file.</p>
  
  <pre><code>import java.io.*;
  import java.lang.*;
  import java.awt.*;
  import java.awt.event.*;
  import javax.swing.*;
  import javax.swing.event.*;
  
  public class sizerist extends JPanel {
      final static sizer[] sizing = new sizer[21];
  
      public sizerist () {}
  
      public static void main(String[] args) {
          final JFrame frame = new JFrame( "sizer - gettin it sized" );
          frame.setLayout(null);
          frame.setSize(320, 260);
          frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
          frame.setVisible( true );
          frame.getContentPane().setBackground( Color.red );
  
  
          for (int i=1; i&lt;6; i++) {
              sizing[i] = new sizer(1);
              if (i == 1) {
                  sizing[i].setLocation( 1, 1);
              } else {
                  sizing[i].setLocation( sizing[i-1].getLocation().x, sizing[i-1].getLocation().y  + sizing[i-1].getSize().height + 2); 
              }
              frame.add(sizing[i]);
              frame.setSize(sizing[i].getSize().width + sizing[i].getLocation().x, sizing[i].getSize().height + sizing[i].getLocation().y + 40);
          }
  
          frame.repaint();
      }
  }
  </code></pre>