Article View: borland.public.jbuilder.java.swing
Article #12992Re: GIF image flicker
From: Vladimir Olenin
Date: Mon, 05 Oct 1998 00:00
Date: Mon, 05 Oct 1998 00:00
57 lines
2680 bytes
2680 bytes
This is a multi-part message in MIME format.
--------------115135378E38661A954C5376
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 7bit
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);
--------------115135378E38661A954C5376
Content-Type: text/x-vcard; charset=koi8-r;
name="keenonjava.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Vladimir Olenin
Content-Disposition: attachment;
filename="keenonjava.vcf"
begin:vcard
n:Vladimir;Olenin
x-mozilla-html:FALSE
adr:version:2.1
version:2.1
email;internet:keenonjava@collegemail.com
note:Java programmer. Open for project development offers. See my home page at: http://www.geocities.com/SiliconValley/Heights/9815/
end:vcard
--------------115135378E38661A954C5376--
Technical Details
Message-ID:
<3617F678.981D335B@collegemail.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36151A61.DC8795B3@sema4.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: Vladimir Olenin <keenonjava@collegemail.com> Subject: Re: GIF image flicker Date: 1998/10/05 Message-ID: <3617F678.981D335B@collegemail.com> X-Deja-AN: 397710191 References: <36151A61.DC8795B3@sema4.com> X-Accept-Language: en,ru Content-Type: multipart/mixed; boundary="------------115135378E38661A954C5376" Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing