title: Swing Java Rotate JLabel but text be erased
body: <p>I'm using swing Java to try to do something with java. Now I want to rotate JLabel and I did that. But unfortunelately, a part of my text in JLabel is erased (as in the image below). I have tried search but seem no one has problems as same as mine. I guess it's occured caused JLabels they overlaped. </p>
  
  <p><a href="https://i.stack.imgur.com/qgqfZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qgqfZ.png" alt="enter image description here"></a></p>
  
  <p>and this is my code</p>
  
  <pre><code>serviceName[j] = new JLabel(name){
      protected void paintComponent(Graphics g) {
  
          Graphics2D g2 = (Graphics2D)g;
          g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
          AffineTransform aT = g2.getTransform();
          Shape oldshape = g2.getClip();
          aT.rotate(Math.toRadians(300));
          g2.setTransform(aT);
          g2.setClip(oldshape);
          super.paintComponent(g);
      }
  };
  </code></pre>
  
  <p>Can you give me the way to solved it</p>