BrushedMetalDemo.java 文件源码

java
阅读 20 收藏 0 点赞 0 评论 0

项目:pumpernickel 作者:
protected void setMetalColor(Color c) {
    BufferedImage image = BrushedMetalLook.getImage(c);
    texturePaint = new TexturePaint(image, new Rectangle(0,0,image.getWidth(),image.getHeight()));

    Shape shape = new Ellipse2D.Float(100,100,400,400);
    image = BrushedMetalLook.paint(shape, 20, null, c, true);
    Icon icon1 = new ImageIcon(image);
    label1.setIcon(icon1);

    shape = new Line2D.Float(100,100,500,500);
    image = BrushedMetalLook.paint(shape, 20, null, c, true);
    ImageIcon icon2 = new ImageIcon(image);
    label2.setIcon(icon2);

    shape = new Line2D.Float(100,500,500,100);
    image = BrushedMetalLook.paint(shape, 20, null, c, true);
    ImageIcon icon3 = new ImageIcon(image);
    label3.setIcon(icon3);

    tabs.repaint();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号