Hi
I would like to have a little credits-window and I tried to do it with a JScrollPane inside a JWindow. I want to let the content sroll upwards slowly, but my problem is that the content doesnt get updatet when I am scrolling it.
I am scrolling it by getting the vertical scrollbar of the JScrollPane, and then changing the value...
Can anyone give me a hint?Code:JScrollPane jsp = new JScrollPane(...a panel with content...); JScrollBar jsb = jsp.getVerticalScrollBar();; int value = jsb.getValue(); for ( int count = 0; count < 100; count++ ) { try { Thread.sleep(300); } catch (Exception e) {} value += 1; jsb.setValue(value); jsp.updateUI(); }
thanks


Reply With Quote


Bookmarks