Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Screen flashing in UNIX

0 views
Skip to first unread message

Cableinet

unread,
Mar 26, 2000, 3:00:00 AM3/26/00
to
Hi,
Okay I have made a graph program using Java3D. It works fine in Windows.
BUT in unix every time you move in and out of the frame displaying the
program the colour all messes up off the whole screen and then returns to
normal when you go out of it.

Somebody on the ng pointed out to me that it may because it(unix) run out of
colours and a default pallete is used but I found some code to stop the
flashing which was as follows:

GraphicsDevice dev =
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
canvas3D = new Canvas3D(dev.getDefaultConfiguration());
SimpleUniverse simpleU = new SimpleUniverse(canvas3D);

where as before I was using:
canvas3D = new Canvas3D(null);
SimpleUniverse simpleU =new SimpleUniverse(canvas3D);

The reason I think that the new code works is because it gets the
configuration of the system and runs the program to that.

The only problem now is that it stops flashing but it displays the graph
with no colour - all black, so that is useless is well.
does anybody know how I can solve this
Thanks
Inderpal


Inderpal Singh

unread,
Mar 27, 2000, 3:00:00 AM3/27/00
to
Joi Ellis wrote:

> In comp.lang.java.gui Cableinet <vrin...@cableinet.co.uk> wrote:
>
> : GraphicsDevice dev =


> : GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
> : canvas3D = new Canvas3D(dev.getDefaultConfiguration());
> : SimpleUniverse simpleU = new SimpleUniverse(canvas3D);
>
> : where as before I was using:
> : canvas3D = new Canvas3D(null);
> : SimpleUniverse simpleU =new SimpleUniverse(canvas3D);
>
> : The reason I think that the new code works is because it gets the
> : configuration of the system and runs the program to that.
>
> : The only problem now is that it stops flashing but it displays the graph
> : with no colour - all black, so that is useless is well.
> : does anybody know how I can solve this
>

> If your x display is out of colors, it's out of colors. You can try
> closing all other apps, using a single-color root wallpaper instead of a
> jpeg, or reconfiguring your X display environment to provide more
> colors. IE change the 8bpp/12bpp/whatever to something higher. This
> may require adding more memory to your device, using a different Xserver
> binary, or whatever.
>
> X users are familiar with this situation. The best you can do is
> somehow provide for a config setting that lets the user choose the
> option they find less objectionable. Personally, I much prefer running
> 24bbp! But when I can't, I select private colormaps because I'd rather
> ignore the flashing when focus leaves the app, than not get colors in
> the app at all.
>
> I've dealt with brain-dead apps that run out of colors and just reuse
> what they could get, which was absolutely useless. If they'd offered
> private colormap support, I would have used it.
>
> --
> Joi Ellis
> gyl...@nospam.visi.com, http://www.visi.com/~gyles19/

what is bbp?
Inderpal

0 new messages