Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at com.jme.app.TestProgressBar.main(TestProgressBar.java:89)
I'm trying that code, but I get that error. I get that for about every single code I run. I was able to run most of the Hello examples. Why can't I run any thing else?
Here is the code directly from what's in the wiki:
package com.jme.app;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.jme.app.SimpleGame;
import com.jme.renderer.Renderer;
import com.jme.scene.Node;
import com.jme.scene.Spatial;
import com.jme.scene.state.LightState;
/**
* Simple Demo Class for the ProgressBar.
*/
public class TestProgressBar extends SimpleGame {
private ProgressBar progressBar;
private Node guiNode;
private int gauge;
private int gaugeChangeValue;
private float lastUpdate;
/**
* Init the Progressbar:
* - Position on Screen
* - Min / Max Values for the Gauge
*/
protected void simpleInitGame() {
gaugeChangeValue = 10;
progressBar = new ProgressBar(display);
progressBar.setMinimum(0);
progressBar.setMaximum(1000);
progressBar.setScale((display.getWidth() / 150),
(display.getHeight() / 175));
// position the progressbar in the lower left corner
progressBar.setPosition(progressBar.getWidth(), progressBar.getHeight()+50);
progressBar.setGauge(gauge);
buildHUD();
}
/**
* create a GUI Node to attach the PrograssBar to.
*/
private void buildHUD() {
guiNode = new Node("gui swing");
// Render the Gui node in the Ortho Queue
guiNode.setRenderQueueMode(Renderer.QUEUE_ORTHO);
// attach the ProgressBars node to the GuiNode
guiNode.attachChild(progressBar.getNode());
// don't cull the gui away
guiNode.setCullMode(Spatial.CULL_NEVER);
// gui needs no lighting
guiNode.setLightCombineMode(LightState.OFF);
// update the render states (especially the texture state of the ProgressBar!)
guiNode.updateRenderState();
// update the world vectors (needed as we have altered local translation
// of the desktop and it's
// not called in the update loop)
guiNode.updateGeometricState(0, true);
}
/**
* Render the GuiNode.
* Notice that the GUI Node was not attached to the RootNode.
*/
@Override
protected void simpleRender() {
display.getRenderer().draw(guiNode);
}
/**
* Update the Progressbar Gauge
*/
@Override
protected void simpleUpdate() {
if (timer.getTimeInSeconds() > lastUpdate + 0.1f) {
gauge += gaugeChangeValue;
if (gauge >= progressBar.getMaximum() ||
gauge <= progressBar.getMinimum()) {
gaugeChangeValue *= -1;
}
lastUpdate = timer.getTimeInSeconds();
}
progressBar.setGauge(gauge);
}
/**
* Entry point.
*/
public static void main(String[] args) {
// We don't want to see Info Messages
Logger.getLogger("com.jme").setLevel(Level.WARNING);
new TestProgressBar().start();
}
}
I'm using Eclipse and I have installed every thing it said too.
Also any thing I try to run, to make it show the props dialog does this:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
ALWAYS_SHOW_PROPS_DIALOG cannot be resolved
at Lesson2.main(Lesson2.java:45)