Java Graphics Draw drawUp(Graphics g, int x, int y, int w, int h)

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

Description

draw Up

License

Open Source License

Declaration

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

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.Color;
import java.awt.Graphics;

public class Main {
    public static final Color SHADOW_DOWN = new Color(128, 128, 128);
    public static final Color SHADOW_UP = new Color(240, 240, 240);

    public static void drawUp(Graphics g, int x, int y, int w, int h) {
        g.setColor(SHADOW_UP);/*  ww w. j a v a2s  .  c  om*/
        g.drawLine(x, y, x + w - 1, y);
        g.drawLine(x, y, x, y + h - 2);
        g.setColor(SHADOW_DOWN);
        g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1);
        g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
    }
}

Related

  1. drawStackTrace(Graphics gr, int x, int y, Throwable ex)
  2. drawStage(Graphics g, int x, int y)
  3. drawStar(Graphics g, int x, int y)
  4. drawTankISPip(Graphics2D g2d, int width, int height)
  5. drawTransparent(Graphics g, int x, int y, int width, int height)
  6. drawWeightBox(Graphics2D g2d, int ycentre, int xcentre, int width)
  7. drawWinUpperLeft(Graphics g, int which, Color fill, int x, int y, int fmWidth, int fmHeight)
  8. drawXMajorScaleTick(Graphics g, int x, int y)
  9. fillVisible(final Graphics g, final JComponent c)