By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,955 Members | 1,793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,955 IT Pros & Developers. It's quick & easy.

cross-platform problem

P: n/a
I have a small GUI program (7 classes), and several of them have constants
defined in them, such as:

private static final Color DEFAULT_COLOR = Color.BLACK;

I've imported java.awt.Color, and all of the files compile and the programs
runs perfectly on a windows 2000 machine. However, when I move the files to
a Unix machine, the files won't compile..."No variable BLACK defined in
java.awt.Color"

Could anybody tell me why this is?
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Top-posting myself here.

No variable EXIT_ON_CLOSE defined in javax.swing.JFrame

Does anyone know why I would get this message on a SunOS 5.8 machine but not
on a Windows 2000 Pro machine?

If it helps, I had the same problems with the Colors (see below)...all of my
files compiled and ran on the Windows machine, but the Sun's compiler
complained "No variable Color.BLACK defined in java.awt.Color", and I solved
it by changing everything from, for example, Color.BLACK to Color.black
because there are lowercase alternatives defined in java.awt.Color.
Unfortunately javax.swing.JFrame has no lowercase alternative for
EXIT_ON_CLOSE.

"Robot Tree" <ye******@netscape.net> wrote in message
news:kts2c.30502$UU.8806@lakeread01...
I have a small GUI program (7 classes), and several of them have constants
defined in them, such as:

private static final Color DEFAULT_COLOR = Color.BLACK;

I've imported java.awt.Color, and all of the files compile and the programs runs perfectly on a windows 2000 machine. However, when I move the files to a Unix machine, the files won't compile..."No variable BLACK defined in
java.awt.Color"

Could anybody tell me why this is?

Jul 17 '05 #2

P: n/a
Top posting myself again...apparently, EXIT_ON_CLOSE is only defined in JDK
1.3 and later, and I guess my schools computers are not up to date or
something.

"Robot Tree" <ye******@netscape.net> wrote in message
news:QWs2c.30507$UU.12512@lakeread01...
Top-posting myself here.

No variable EXIT_ON_CLOSE defined in javax.swing.JFrame

Does anyone know why I would get this message on a SunOS 5.8 machine but not on a Windows 2000 Pro machine?

If it helps, I had the same problems with the Colors (see below)...all of my files compiled and ran on the Windows machine, but the Sun's compiler
complained "No variable Color.BLACK defined in java.awt.Color", and I solved it by changing everything from, for example, Color.BLACK to Color.black
because there are lowercase alternatives defined in java.awt.Color.
Unfortunately javax.swing.JFrame has no lowercase alternative for
EXIT_ON_CLOSE.

"Robot Tree" <ye******@netscape.net> wrote in message
news:kts2c.30502$UU.8806@lakeread01...
I have a small GUI program (7 classes), and several of them have constants defined in them, such as:

private static final Color DEFAULT_COLOR = Color.BLACK;

I've imported java.awt.Color, and all of the files compile and the programs
runs perfectly on a windows 2000 machine. However, when I move the

files to
a Unix machine, the files won't compile..."No variable BLACK defined in
java.awt.Color"

Could anybody tell me why this is?


Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.