How do I prevent a headless exception in Java?
===

I have an applet and when I try to run it on my laptop, a headless exception is thrown by Java at the line where a JFrame is created. Now I know why the JFrame normally causes the exception but my computer was not in headless mode to begin with. I'm also still not sure what headless mode entails exactly.

I'm running Ubuntu and have a pretty recent version of java.

Also, I have successfully created JFrames and such in Eclipse when running Windows on my laptop (if that helps).