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
Joana - 07 Dec 2003 17:13 GMT
hello,
I have tried to solve my problem again...
I found the 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