void (Graphics g) { Point point = UIUtil.getLocationOnScreen(this); if (point != null) { Rectangle bounds = getBounds(); myScreenBounds = new Rectangle(point.x, point.y, bounds.width, bounds.height); } if (!myEnabled && g instanceof Graphics2D) { ((Graphics2D)g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.3f)); } super.paintComponent(g); }