Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java 1.1 custom components. Painting problem.

Status
Not open for further replies.

todor

Programmer
Sep 28, 2001
2
US
I have a component extends class Component. I overwrote some methods - actually they are:
getPreferredSize (),
getMaximumSize (),
I keep components size in my width and height fields in my component and pass this filds to the overwritten methods above.
In addition in method paint (Graphics g) I draw some things.
Thi problem is that when I add this component in a Panel, or in some Container, and add this container in ScrollPane, when I scroll, there is a flash effect on my component. I tryed to paint in buffer the Container contains my component, but it doesn't work. This effect is missing on regular components like Buttons.
The qustion is - Is it posible to avoid this flash. And if it is posible - How to do it?
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top