Article View: borland.public.jbuilder.java.swing
Article #13011Re: GIF image flicker
From: Alex Humphreys
Date: Tue, 06 Oct 1998 00:00
Date: Tue, 06 Oct 1998 00:00
47 lines
2582 bytes
2582 bytes
Hm. I checked the JPanel that I'm adding the image too, and doubleBuffering is set to true. But it still flickers(!). Am I missing
something?
Vladimir Olenin wrote:
> Try to use double buffering. Actually BevelPanel has a flag "double
> buffering", if i'm not mistaken. (At least JPanel has it 4 sure). So, u
> can just turn this option on and then add image to that BevelPanel (or
> JPanel). If u don't like either of these ways 4 some reason, u can also
> write your own code, which is not very complicated. (As far as i
> remember, u'd write repaint method. The trick is that firstly u paint
> your image on "virtual" screen in RAM. Then, just print that screen on
> your display.) Think the problem would be solved.
>
> Vladimir Olenin
>
> Alex Humphreys wrote:
> >
> > I've created a splash screen by extending Window (instead of
> > Dialog--thanks, Greg H) and including a GIF image in the Window.
> > Trouble is it flickers horribly as it loads (it's bad with interlacing
> > turned on, is worse with it off, and was not nearly so bad when
> > extending Dialog instead of Window). Is there a way to get it to paint
> > smoothly? Thanks.
> >
> > --Alex
> >
> > Here's the relevant code:
> >
> > splash_img.setFlat(true);
> > splash_img.setImage(ImageLoader.loadFromResource("SITEsplash.GIF",
> > this));
> > xYLayout1.setWidth(486);
> > xYLayout1.setHeight(324);
> > this.setLayout(xYLayout1);
> > this.add(splash_img, new XYConstraints(0, 0, 486, 324));
> > this.add(panel1);
>
> ------------------------------------------------------------------------
>
> <keenonjava@collegemail.com>
> version:2.1
> Java programmer. Open for project development offers. See my home page at: http://www.geocities.com/SiliconValley/Heights/9815/
> Additional Information:
> Last Name Vladimir
> First Name Olenin
> Version 2.1
Technical Details
Message-ID:
<361A875B.2004C175@sema4.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36151A61.DC8795B3@sema4.com> <3617F678.981D335B@collegemail.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,63559af4ae2f864 X-Google-Attributes: gid111d45,public From: Alex Humphreys <ahumphreys@sema4.com> Subject: Re: GIF image flicker Date: 1998/10/06 Message-ID: <361A875B.2004C175@sema4.com> X-Deja-AN: 398398647 Content-Transfer-Encoding: 7bit References: <36151A61.DC8795B3@sema4.com> <3617F678.981D335B@collegemail.com> Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing