AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

jdesktop, jinternalframe update/repaint problem after jdialo

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
anders
Guest





PostPosted: Sat Jun 19, 2004 10:29 am    Post subject: jdesktop, jinternalframe update/repaint problem after jdialo Reply with quote



Hello,

I have an application that uses a JDesktopPane, with a menubar
and several opened JInternalFrames, some of them partly covering
the visible surface of another.

I can bring to front each of them and the JDesktopPane and
all frames will be repainted correctly.

But if I open a JDialog, to get some user input, the JDesktopPane and
all frames will NOT be repainted once I close the JDialog, i.e. a big
grey surface remains on the screen where the JDialog was.

First I tried to add

System.out.println("a");
desktopPane.revalidate();
desktopPane.repaint();
System.out.println("b");

after the JDialog is closed but this doesn't seem to have an impact.
I can see the "a" and the "b" in the output, hence the revalidate and
paint should have been issued.

Next I tried to revalidate and repaint all the open frames with:

JInternalFrame[] frames = desktopPane.getAllFrames();
for(int i=0; i < frames.length; ++i)
{
frames[i].revalidate();
frames[i].repaint();
};

but this does not update the screen either.

The only thing that works is

JInternalFrame[] frames = desktopPane.getAllFrames();
for(int i=0; i < frames.length; ++i)
{
frames[i].toFront();
};

But this is not very "nice" as it brings to front unecessary windows.
I can of course program it bit smarter so that only internalframes
with visible parts are put to front, but I guess there must be a simpler
way?

any ideas?

thanks in advance!



Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.