Java 类javax.swing.plaf.metal.MetalBorders.ToolBarBorder 实例源码

项目:openjdk-jdk10    文件:Test6657026.java   
private void test() {
    MyGraphics mg = new MyGraphics();
    ToolBarBorder border = new ToolBarBorder();
    border.paintBorder(mg.component, mg, 0, 0, 10, 10);
    if (mg.image != null) {
        boolean failed = true;
        int value = mg.image.getRGB(0, 0);
        for (int x = 0; x < mg.image.getWidth(); x++) {
            for (int y = 0; y < mg.image.getHeight(); y++) {
                int current = mg.image.getRGB(x, y);
                if (current != value) {
                    mg.image.setRGB(x, y, value);
                    failed = false;
                }

            }
        }
        if (failed) {
            throw new Error("shared metal bumps");
        }
    }
}