File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes java swing repaint Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "java swing repaint" Watch "java swing repaint" New topic

java swing repaint

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
Hi, I want to draw a picture in a JLabel. When I click the image, it will draw a rectangle on it, just like tooltip.

I have tried the coding below. But it doesn't work. I get the click position X / Y , and then call repaint() to draw a rect .


I agree. Here's the link:
subject: java swing repaint
jQuery in Action, 3rd edition