JViewPorts Client not refreshed

J

Joana

hello,

I please for some help in following problem...

Starting point:
JScrollPane scrollPane = new JScrollPane();
scrollPane.setPreferredSize(new Dimension(500,450));

//viewClient has got a computed mathematical grafic
JComponent viewClient = myExternLibrary.getJComponent();
scrollPane.setViewportView(viewClient);

Result:
There is a piece of the mathematical grafic(left,top piece) in the
programwindow. It is all ok.

For example:

scrollPane:
|--------------|
| |
| ---|
| \ |
| \ |
| \|
| |
|<============>|
(horizontal JScrollBar )

Problem:
If I have manipulated the visible area with buttons,all has been ok.
But if I have manipulated with knob, the JViewPort has refreshed
incompletely.

for example:

I pull knob on the right and allways become(a picture). But b Picture
is korrectly.

(a picture) (b picture)
scrollPane:
|---------------| |---------------|
| | | ###|
| --- ---| | --- |
| \ \ | | \ |
| \ \ | | \ |
| \ \| | \ |
| | | ###|
|<=============>| |<=============>|


Thanks for any help!!

best regards,
Joana
 
J

Joana

hello,

I have tried to solve my problem again...
I found one strange feature:

For example, my JComponent, he's a client of JViewPort, has a size
(width,height).
When I set jscrollpane.setPreferredSize(800,800), there isn't any
problem.
But, when I set the size (300,300), I get the same problem from my
first posting again.

I can not understand it! If somebody has any ideas, please help...
thanks,

Joana
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top