Texture tex = ((TextureState)particleMesh.getRenderState( RenderState.RS_TEXTURE)).getTexture(); try { imageLabel.setIcon( new ImageIcon(new URL(tex.getImageLocation()))); } catch (MalformedURLException e) { e.printStackTrace(); }
    public void updateFromManager() {        startColorPanel.setBackground(makeColor(particleMesh                .getStartColor(), false));        endColorPanel.setBackground(makeColor(particleMesh                .getEndColor(), false));        startAlphaSpinner.setValue(new Integer(makeColor(                particleMesh.getStartColor(), true).getAlpha()));        endAlphaSpinner.setValue(new Integer(makeColor(                particleMesh.getEndColor(), true).getAlpha()));        updateColorLabels();        startSizeSlider.setValue((int) (particleMesh                .getStartSize() * 10));        endSizeSlider                .setValue((int) (particleMesh.getEndSize() * 10));        updateSizeLabels();        minAgeSlider.setValue((int) (particleMesh                .getMinimumLifeTime()));        maxAgeSlider.setValue((int) (particleMesh                .getMaximumLifeTime()));        updateAgeLabels();        speedSlider.setValue((int) (particleMesh.getParticleController().getSpeed() * 10));        updateSpeedLabels();        gravXSlider                .setValue((int) (particleMesh.getGravityForce().x * 1000));        gravYSlider                .setValue((int) (particleMesh.getGravityForce().y * 1000));        gravZSlider                .setValue((int) (particleMesh.getGravityForce().z * 1000));        emitXSlider.setValue((int) (particleMesh                .getEmissionDirection().x * 10));        emitYSlider.setValue((int) (particleMesh                .getEmissionDirection().y * 10));        emitZSlider.setValue((int) (particleMesh                .getEmissionDirection().z * 10));        angleSlider.setValue((int) (particleMesh                .getMaximumAngle() * FastMath.RAD_TO_DEG));        minAngleSlider.setValue((int) (particleMesh                .getMinimumAngle() * FastMath.RAD_TO_DEG));        updateAngleLabels();        randomSlider                .setValue((int) (particleMesh.getRandomMod() * 10));        updateRandomLabels();        rateBox.setSelected(particleMesh.getParticleController().getControlFlow());        rateSlider.setValue(particleMesh.getReleaseRate());        rateSlider                .setMaximum(particleMesh.getNumParticles() * 5);        rateVarSlider.setValue((int) (particleMesh                .getReleaseVariance() * 100));        updateRateLabels();        spawnBox                .setSelected(particleMesh.getParticleController().getRepeatType() == Controller.RT_WRAP);        velocitySlider.setValue((int) (particleMesh                .getInitialVelocity() * 100));        updateVelocityLabels();        spinSlider.setValue((int) (particleMesh                .getParticleSpinSpeed() * 100));        updateSpinLabels();        regenCode();        validate();    }