See which of your colleagues or former colleagues are already on Java Link: Check out the Contact Finder
Java - General » AWT » paint method and Focus?

278 Views
  1 Replies

0
Vote Vote
paint method and Focus?
Share  
 Type: Professional, Report if fun topic
Sid
Sid Picture
2 Posts
back to top
Posted 19-01-2009Reply

Hi All,

I am using AWT buttons. I wanted to know when the paint() method is called?

in Container, I call following,



button.setLocation(x, y);

buttong.setSize(blablasize);

button.setVisible(true);

button.requestFocus();



And What are the steps to be taken care while calling requestFocus()?





Thanks

Sid

Mithil
Mithil Picture
5 Posts
back to top
  Rated +1 | Posted 28-01-2009

This is a nice article on painting and how/when it is done on sun site.
Please go thru it.
http://java.sun.com/products/jfc/tsc/articles/painting/

and also as mentions in the java docs,

This component must be displayable, visible, and focusable for the request to be granted.

0
Vote Vote
Share  
 Type: Professional, please report if fun topic

Recent Activity in Forums

05-04-2012.
05-04-2012.
Kanchana posted a new forum topic in
27-02-2012.
11-02-2012.
Kanchana posted a new forum topic in
11-02-2012.