On Sat, Mar 24, 2001 at 01:27:15AM -0500, cindy wrote:
| I was using Blackdown distro but decided to change to IBM rel. 1.3.0.
| I'm writting few simple programs to learn jython and came across some
| I have a statement in one of my test module that looks like this;
| "self.aFrame.setBackground(java.awt.Color.green)". When I
| run the module it displays green, but within the batt-of-the-eye the
| color turn to gray. I should point out that when I start this module I
| an error message that looks like this;
| Warning: Cannot allocate colormap entry for default background
| Can someone give me a solution for this.
Get a new video card <wink>. I have seen this happen on various
systems with various programs. I have never had any colormap problems
on my x86 Linux system because I run X at 32bpp. The SPARC Solaris
systems in the school's labs however run at 8bpp (it sucks, btw). If
I XDMCP to my Linux box I get an interesting rainbow effect with GDM
and other stuff, simply because the solaris display not having all the
colors (or resolution) I have. I used AfterStep for a while in the
lab and had lots of colormap problems. AfterStep used a lot of colors
for it's dock and stuff so Xfig and Netscape would lose out. Netscape
is a color hog too. If you don't want a new video card then try
adjusting your X settings or quit applications that hog the colors.
| Second problem is terninating the window. I use the window manager to
| the window. That works ok. However I don't get the command line return
| me until I use cntrl-d to kill the process. Is this action going to
| persist until I close my window with a java statement?
When you start your app there is a main thread. Then you create some
AWT widgets and an AWT thread and an AWT_EventQueue thread is started.
your "main" method will terminate after initializing the window and
the main thread will die. The AWT thread is still running, however,
and it is not a daemon thread. Thus your app won't quit and return to
the commandline until that thread is killed or you call
java.lang.System.exit() (or sys.exit()). Even if you get uncaught
exceptions, there are still non-daemon threads running so the app