title: How to fix location error on java labels in GUI Application Used SWING?
body: <p>I used following code to display multiple lables on java GUI app. But when i used the location method for the last label object, it was not worked properly. The case is always effected to the last object of the flow. follwoing is the code segment and the screen shot of the output window. please give me your feedback to solve this. Thanks!</p>
  
  <pre><code>package gui.creating;
  /**
   *
   * @author Dilan Dinushka
   */
  import javax.swing.*;
  public class GUICreating 
  {
      /**
       * @param args the command line arguments
       */
      public static void main(String[] args) 
      {
          JFrame frame1 = new JFrame();
          frame1.setSize(500,500);
          frame1.setTitle("BASIC GUI APPLICATION");
          frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame1.setVisible(true);
  
          JLabel lbl1 = new JLabel("Welcome to IDM!");
          lbl1.setBounds(100,100,200,50);
          frame1.add(lbl1);
  
  
         JLabel lbl3 = new JLabel("Thank You");
          lbl3.setBounds(100,200,200,50);
          frame1.add(lbl3);
  
          JLabel lbl2 = new JLabel("Nuturing Achievers");
          lbl2.setBounds(100,150,200,50);
          frame1.add(lbl2);
      }
  }
  </code></pre>