permaculture playing cards
The moose likes Swing / AWT / SWT and the fly likes Screen flickering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Screen flickering" Watch "Screen flickering" New topic

Screen flickering

Omkar Shetkar
Ranch Hand

Joined: Jun 22, 2006
Posts: 74


I have an implementation of wizard. Here, each page is a component. Wizard contains a container to which I will be adding the component. Container at any point of time will contain only one component representing the current page. When the page transition happens, I will remove the current component and add the new component. This action is leading to blank screen for a second and showing of new page. This causes sudden flashing of new screen which is not acceptable. Please suggest how to avoid this behavior.

Here, container is java.awt.Container.
newWizardPage is javax.swing.JPanel

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> I have an implementation of wizard.

far better off adding all your wizard panels to a CardLayout panel,
then using or previous() or show().

no need to remove any panels.
I agree. Here's the link:
subject: Screen flickering
jQuery in Action, 3rd edition