code: @Override
      protected void paintComponent(Graphics g) {
          final Graphics2D G2 = (Graphics2D) g.create();
  
          G2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
          G2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
          G2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
          G2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
  
          // Translate the coordinate system related to insets
          G2.translate(getFramelessOffset().getX(), getFramelessOffset().getY());
  
          // Draw combined background image
          G2.drawImage(bImage, 0, 0, null);
  
          // Draw the symbol image
          if (on) {
              G2.drawImage(symbolOnImage, 0, 0, null);
          } else {
              G2.drawImage(symbolOffImage, 0, 0, null);
          }
  
          // Draw combined foreground image
          G2.drawImage(fImage, 0, 0, null);
  
          if (!isEnabled()) {
              G2.drawImage(disabledImage, 0, 0, null);
          }
  
          // Translate the coordinate system back to original
          G2.translate(-getInnerBounds().x, -getInnerBounds().y);
  
          G2.dispose();
      }
docs: <editor-fold defaultstate="collapsed" desc="Visualization">