Java Code Examples for javax.swing.plaf.metal.MetalBorders.ToolBarBorder

The following examples show how to use javax.swing.plaf.metal.MetalBorders.ToolBarBorder. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: openjdk-jdk9   Source File:    License: GNU General Public License v2.0 6 votes vote down vote up
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");