Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / December 2003

Tip: Looking for answers? Try searching our database.

Redraw Occluded Items?

Thread view: 
Steve - 30 Nov 2003 23:11 GMT
I have a Java application that creates a window using JFrame. When I move
another window over this to partially or completely occlude the JFrame, the
JFrame's contents are not redrawn. What do I need to do so the JFrame
redraws items that are no longer occluded?

Thanks.

Steve
A. Bolmarcich - 01 Dec 2003 04:27 GMT
> I have a Java application that creates a window using JFrame. When I move
> another window over this to partially or completely occlude the JFrame, the
> JFrame's contents are not redrawn. What do I need to do so the JFrame
> redraws items that are no longer occluded?

You should not need to do anything.  The windowing system should send
a windowing system specific exposed event to the window.  The
implementation of Java should process that event and generate a Java
event to update the region of the JFrame that has been exposed.  Make
sure that the JFrame correctly updates and paints itself.
Chris Smith - 01 Dec 2003 18:33 GMT
> I have a Java application that creates a window using JFrame. When I move
> another window over this to partially or completely occlude the JFrame, the
> JFrame's contents are not redrawn. What do I need to do so the JFrame
> redraws items that are no longer occluded?

You need to review your implementation of paint (or paintComponent) to
ensure that it's correct and capable of fully repainting the window at
any time.  You need to make sure that if you do painting outside of
paint (or paintComponent), that you understand that it's entirely
transient and could go away at any time with an appropriate paint event.

Sounds like you're not doing event-based painting properly.

Signature

www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.