Package javax.swing

Examples of javax.swing.ImageIcon.paintIcon()


        Color old = g.getColor();
        g.setColor(getBackground());
        g.fillRect(0, 0, getWidth(), getHeight());

        ImageIcon nodeImage = getNodeImage();
        nodeImage.paintIcon(this, g, 0, 0);

        g.setColor(old);
    }
}
View Full Code Here


        int leftSpaceOfClearIcon = 0;
        if (displayClearIcon)
        {
          ImageIcon icon = getClearIcon();
          int margin = (height - icon.getIconHeight()) / 2;
          icon.paintIcon(c,
              g2d, x + width - margin - icon.getIconWidth(),
              y + margin);
          leftSpaceOfClearIcon = margin + icon.getIconWidth();
        }
        if (displayRefreshIcon)
View Full Code Here

          }
        }

        g2d.dispose();
        // render image
        image.paintIcon(c, g, x, y);
       
      }
    };
  }
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.