title: Change overlapping of JButtons in flowlayout
body: <p>How do I repaint the farthest right card last and the left most first so the overlapping will reverse?</p>
  
  <p>So I have a JPanel in flowlayout which contains JButtons. I want to emulate the feel of holding cards in hand, so I overlapped the JButtons. The problem is that the overlapping of the images of the JButtons is so that the numbers only appear at the bottom right corner, where I want them to be top left.
  This is what I have now:</p>
  
  <p><img src="https://i.stack.imgur.com/INhiD.png" alt="enter image description here"></p>
  
  <p>ZOrdering didn't work, it only reversed the order of the cards (ace on other side, king first, etc). What I want is to repaint the farthest right card last and the left most first so the overlapping will reverse.</p>
  
  <p><strong>Edit:</strong>
  The code for constructing the hand:</p>
  
  <pre><code>hand= new JPanel();
      hand.setLayout(new FlowLayout(FlowLayout.CENTER, -45, 0));
      hand.setOpaque(false);
      for(int i=0; i&lt;p1.getHand().size(); i++){
          JButton te=new JButton();
          //button customization, icons and such
          te.addActionListener(this);
          //here I tried the ZOrdering that didn't work
          //hand.setComponentZOrder(te, 0)
          hand.add(te);
      }
      this.add(hand);
      }
      //yes, the setBounds is long and weird 
      hand.setBounds(WINDW/2-((p1.getHand().size())*CARDWHAND*2/5), WINDH-CARDHHAND-30, p1.getHand().size()*CARDWHAND*4/5+50, CARDHHAND+30);
  </code></pre>
  
  <p>this layout manager is null</p>