Java Swing 3D Border drawPressed3DBorder(Graphics g, int x, int y, int w, int h)

Here you can find the source of drawPressed3DBorder(Graphics g, int x, int y, int w, int h)

Description

draw Pressed D Border

License

Open Source License

Declaration

static void drawPressed3DBorder(Graphics g, int x, int y, int w, int h) 

Method Source Code


//package com.java2s;
import java.awt.Graphics;
import javax.swing.UIManager;

public class Main {
    static void drawPressed3DBorder(Graphics g, int x, int y, int w, int h) {
        g.translate(x, y);// ww  w  .  j  a v  a2s. com
        g.setColor(UIManager.getColor("controlShadow"));
        g.drawLine(0, 0, w - 2, 0);
        g.drawLine(0, 0, 0, h - 2);
        g.setColor(UIManager.getColor("controlLtHighlight"));
        g.drawLine(w - 1, 0, w - 1, h - 1);
        g.drawLine(0, h - 1, w - 1, h - 1);
        g.translate(-x, -y);
    }
}

Related

  1. drawFlush3DBorder(Graphics g, int x, int y, int w, int h)
  2. drawFlush3DBorder(Graphics g, Rectangle r)
  3. drawPressed3DBorder(Graphics g, int x, int y, int w, int h)
  4. drawPressed3DBorder(Graphics g, int x, int y, int w, int h)