Discussion Locked

JFrame and color pallette

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I attempted to make visible JFrame object on NT.
JVM complained that I have to set at least 256 colors from control panel-->display-->settings. And it crashed somewhere in native method. By reason that only God knows I couldn't change color pallette from 16 to 256. I run w98 and NT on same PC and w98 accept 256 colors but NT doesn't. So my question is : how to change JFrame settings to allow work with 16 colors. There should be some property setting in one of upper classes that JFrame extends.Help me please to resolve this puzzle.
-Anatoly.

5 replies

by boyarsky

In the UIManager class, there is a method called setLookAndFeel(). Pass this method a BasicLookAndFeel object. The BasicLookAndFeel has a method called loadSystemColors().

Hope this helps.

by anatoly.goldberg

I tried what you said. It didn't work. The point is that 'awt' package and Microsoft j++ examples worked o'key for me. Only JFrame caused the problem when i called method
'...makeVisible(true)'.
It would be great to get more details with the answer. Perhaps, even the code snippet might be helpful. Thank you anyway.

This discussion is closed to new replies.