Example usage for java.awt Graphics getClipRect

List of usage examples for java.awt Graphics getClipRect

Introduction

In this page you can find the example usage for java.awt Graphics getClipRect.

Prototype

@Deprecated
public Rectangle getClipRect() 

Source Link

Document

Returns the bounding rectangle of the current clipping area.

Usage

From source file:Main.java

public void paint(Graphics g) {
    g.drawString(g.getClipRect() + "", 10, 30);
}

From source file:SlidePuzzle.java

public void paint(Graphics g) {
    if (m_fAllLoaded) {
        Rectangle r = g.getClipRect();
        g.clearRect(r.x, r.y, r.width, r.height);
        g.drawImage(logo, 0, 0, null);/*from   w ww . ja  v  a2 s  .c  o m*/

    } else
        g.drawString("Loading images...", 10, 20);

}