I'm calling createImage(x, y) to create a canvas to draw on. Works fine. Decided to add a UI to my little program. So I made a JFrame, put my JPanel with my image in it, and added the UI. Now createImage() returns null, digging shows isHeadless() is returning true.
So, uh, wot's the deal?
And do I have the right basic idea? Make a new container (JFrame), put the working JPanel into it, and add the UI as well? Or should I be doing something else?
While I'm at it, what's the difference between createImage() and createVolatileImage()? Quality google time indicates the latter is a newer version of the former, but I found nothing to either confirm or deny that guess.
How about a little bit of code. RunGUI is the class that does display related stuff, it runs in it's own
thread. 'game' is the JPanel that used to work on it's own.
Feel free to critique this stuff, I'm a
Java n00b. FUDGEX and FUDGEY tell me I'm doing something wrong.
/ I know what headless means
// 90% of what I write in the real world are for headless systems.
/// It's why I suck at UIs, I never have to write them.