Java - General » AWT » paint method and Focus?
278 Views
1 Replies
paint method and Focus?
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
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.
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.










