File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes error message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "error message" Watch "error message" New topic
Author

error message

Thomas Whalen
Ranch Hand

Joined: Aug 26, 2001
Posts: 123
Here is the error message I got when running my java program that uses a nested while(){} loop:
Warning: Cannot allocate colormap entry for default background.

here is my code: I really have NO clue what I am doing wrong :/


if you don't know, then ask. if you do know, then share. love is knowledge.
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
One thing I notice is that you are checking for the value of Strings using "==" instead of equals() or equalsIgnoreCase().
You might want to change the appropriate conditionals to something like the following:
if("yes".equals(run))
while("yes".equals(run))
while("yes".equals(flag))
HTH
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 984

Not sure.
But don't you want to use ".equals()" instead of "=="?


Please ignore post, I have no idea what I am talking about.
Thomas Whalen
Ranch Hand

Joined: Aug 26, 2001
Posts: 123
At the time I didn't know that I wanted to use ".equals("foo")", but now I do It's been a while since I played with this language.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error message
 
Similar Threads
Catching a NullPointerException
Noob java assigment
Desperately need help writing Tester
Math question (very beginner)
indexOf() error