code: @Override
     protected String layoutCL(JLabel label, FontMetrics fontMetrics,
           String text, Icon icon, Rectangle viewR, Rectangle iconR,
           Rectangle textR) {
  
        verticalViewR = transposeRectangle(viewR, verticalViewR);
        verticalIconR = transposeRectangle(iconR, verticalIconR);
        verticalTextR = transposeRectangle(textR, verticalTextR);
  
        text = super.layoutCL(label, fontMetrics, text, icon,
              verticalViewR, verticalIconR, verticalTextR);
  
        copyRectangle(verticalViewR, viewR);
        copyRectangle(verticalIconR, iconR);
        copyRectangle(verticalTextR, textR);
        return text;
     }
docs: Transposes the view rectangles as appropriate for a vertical view
  before invoking the super method and copies them after they have been
  altered by {@link SwingUtilities#layoutCompoundLabel(FontMetrics, String,
  Icon, int, int, int, int, Rectangle, Rectangle, Rectangle, int)}