Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Image flickering inside ScrollPane

opfauJul 25 2012 — edited Jul 25 2012
Hi,

I have some ImageView's in a VBox which is in a ScrollPane which is on the left side of a SplitPane. If I move the slider of the SplitPane I update the ImageViews's width with setFitHeight(...) like this:
anchorSplitRightTop.boundsInLocalProperty().addListener(new ChangeListener<Bounds>() {
			@Override
			public void changed(ObservableValue<? extends Bounds> observable, Bounds oldValue, Bounds newValue) {
				int width = (int) (imagesScrollPane.getWidth());
		                for (ImageView curImageView : imageViews) {
			             curImageView.setFitWidth(width - 30);
		                }

			     }
		        });
It works generally with good performance, but sometime after moving the slider of the SplitPane around, there are something like ghosts picstures are visible. This it looks like during moving the slider the ScrollPane jumps to another image (changes the y coordinate). So I see just some milliseconds another image when the SplitPane is resizing. It the mouse button is released and the sliding ends, I see the correct region. When these "ghost pictures" are displayed, the scrollbar position is not changed jumping.
Any ideas? Bad implementation from my side or a bug?

Regards
Oliver
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 22 2012
Added on Jul 25 2012
1 comment
243 views