/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.jemmy.browser; import java.awt.Color; import java.awt.Graphics; import javax.swing.JLabel; import org.jemmy.Rectangle; /** * * @author shura */ public class ImageLabel extends JLabel { private org.jemmy.Rectangle bounds = new org.jemmy.Rectangle(100, 100, 100, 100); public ImageLabel() { super(); } public void setBounds(Rectangle bounds) { this.bounds = bounds; repaint(); } @Override public void paint(Graphics grphcs) { super.paint(grphcs); grphcs.setColor(Color.red); if(bounds != null) { grphcs.drawRect(bounds.x - 1, bounds.y - 1, bounds.width + 2, bounds.height + 2); } } }