I'm trying to create a JavaFX program, and every time when i add any thing from the library of jfoenix I try to run my code I am getting an exception - I'm not entirely sure what it means though...
My code is:
public class home extends Application {
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("home.fxml"));
Scene scene = new Scene(root,1300,768);
scene.getStylesheets().add(getClass().getResource("Style.css").toExternalForm());
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
My controller is:
public class HomeController implements Initializable {
@FXML
private JFXButton log;
@FXML
private JFXButton engr;
@FXML
private Pane login,eng;
@FXML
private void changeofpages(MouseEvent event) {
if (event.getTarget()== log){
login.setVisible(true);
eng.setVisible(false);
}else
if (event.getTarget()== engr){
eng.setVisible(true);
login.setVisible(false);
}
}
@Override
public void initialize(URL url, ResourceBundle rb) {
// TODO
}
}