title: How do I move a component in a layout?
body: <p>How do I move a component in a frame while I am using a layout? I have tried this:</p>
  
  <pre><code>    System.out.println(test1.getLocation());
      int oy = test1.getY();
      int ox = test1.getX();
      oy++;
      ox++;
      test1.setLocation(ox, oy);
      validate();
      test1.validate();
      System.out.println(test1.getLocation());
  </code></pre>
  
  <p>The first location is the same as the last location. I know that you can't change the location while in the layout normally, but how do you accomplish it? I have asked a similar question before and never got an answer. I have searched all over the internet for this, but I haven't found an answer.</p>
  
  <p>TL;DR - How do you move a component?</p>