For this I have to scroll some text
automatically from the program itself or show the text page by page
automatically. I want to make some delay before switching over to the
next page(i. e. while showing the rest of the text in the JPanel).
But the panel does not show the transition at all. It paints(not
visible) all the sequences and becomes visible when all the paint
jobs end. Thus I always see the last part of the text. The previous
text segments are not painted immediately.