Ali Yazdani February 2016

JavaFX PerspectiveCamera error

I wanna write a code about using PerspectiveCamera in JAvaFX but I always get error when defining new PerspectiveCamera with constructor

Here is my a part of my code:

import javafx.scene.PerspectiveCamera;
...
PerspectiveCamera camera = new PerspectiveCamera(false);

but it says:

constructor PerspectiveCamera in class PerspectiveCamera cannot be applied to given types;

I'm using JavaFX version 2.2.60-ea-b15

Answers


mipa February 2016

Your JavaFX version is very outdated (Java7 update 60). I am not sure it supports 3D at all. Try to update to a recent version. You also did not mention the system you are running on.


fabian February 2016

The constructor you're trying to use was added in JavaFX version 8. Therefore it's not available using JavaFX 2.X.

See javadocs:

[...]

Since:

JavaFX 8.0

Post Status

Asked in February 2016
Viewed 2,420 times
Voted 11
Answered 2 times

Search




Leave an answer