Java Swing Border drawBorderTrans(Graphics2D g, JComponent focusOwner, JComponent area)

Here you can find the source of drawBorderTrans(Graphics2D g, JComponent focusOwner, JComponent area)

Description

draw Border Trans

License

Open Source License

Declaration

public static void drawBorderTrans(Graphics2D g, JComponent focusOwner, JComponent area) 

Method Source Code


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

import java.awt.Color;
import java.awt.Graphics2D;
import javax.swing.JComponent;

public class Main {
    public static void drawBorderTrans(Graphics2D g, JComponent focusOwner, JComponent area) {

        if (focusOwner != null && focusOwner.isFocusOwner()) {
            g.setColor(new Color(180, 180, 180));
            g.drawRect(0, 0, area.getWidth() - 1, area.getHeight() - 1);
        }/*from ww  w .  ja  va 2 s . c o  m*/

    }
}

Related

  1. createJScrollPane(Component component, Rectangle bounds, Color backgroundColor, boolean noBorder, boolean visible)
  2. createRightBorder(int size, Color color)
  3. createRoundedEmptyBorder(final int top, final int left, final int bottom, final int right, final int arc, final Color color)
  4. createTitledBorder(Color color, String name)
  5. createVerticalBox(Border border, Component... comps)
  6. drawBorderWhite(Graphics2D g, JComponent focusOwner, JComponent area)
  7. drawDisabledBorder(Graphics g, int x, int y, int w, int h)
  8. drawDisabledBorder(Graphics g, int x, int y, int w, int h)
  9. extendByBorder(JLabel label, Dimension dm)