JFrame refresh problem

A

alex_us01

hello,

I have a JFrame that I put two components, one on BorderLayout.CENTER
and the other is at EAST.
When I cover with another window, and then uncover,
the part that is uncovered does NOT refresh.
It is unbelievable.

I put the component at EAST to another JFrame and no such problem
happens. The component on CENTER uses some library and rendering
that I didn't write myself (JUNG's GraphDraw).

Any ideas? What could be the problem?
Or, how can I fix it?

thanks,
alex
 
O

Oliver Wong

alex_us01 said:
hello,

I have a JFrame that I put two components, one on BorderLayout.CENTER
and the other is at EAST.
When I cover with another window, and then uncover,
the part that is uncovered does NOT refresh.
It is unbelievable.

I put the component at EAST to another JFrame and no such problem
happens. The component on CENTER uses some library and rendering
that I didn't write myself (JUNG's GraphDraw).

Any ideas? What could be the problem?
Or, how can I fix it?

I'm not familiar with Jung GraphDraw, and I'm too lazy to read through
the whole API documentation for you. That being said, I am willing to help
you if you post an SSCCE: http://www.physci.org/codes/sscce.jsp

By posting a short compilable example, I can see what classes of the
JUNG API you're actually using, and then only read the documentation for
those classes. Try to make the example as short as possible while still
demonstrating the bug, or else I might get discouraged by its length and not
bother reading it.

If it's of any help, my guess is that the problem has nothing to do with
your adding a component to the EAST.

- Oliver
 
A

alex_us01

Thanks, Oliver.
I would agree with your guess that it doesn't have to do anything with
adding it to the EAST. I was working on my home computer when I posted.
Now, I am working on another computer and I can't see the problem any
more. I hope it is gone. Otherwise, I have no idea what is causing it.
Thanks for offering your help. I really appreciate it.

all the best,
alex
 
R

Roedy Green

I have a JFrame that I put two components, one on BorderLayout.CENTER
and the other is at EAST.
When I cover with another window, and then uncover,
the part that is uncovered does NOT refresh.
It is unbelievable.

Without posting any code all you can get are guesses. The usual
reason for lack of redraw is tying up the Swing thread with a sleep or
cpu intensive task.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top