Skip to Main Content


915418Dec 20 2012 — edited Dec 21 2012
Im uuing pretty mych default example file. Im trying to make default javafx program to load another scene from default button. Im using Netbeans 7.2.1.

lines which is errorious is:
Parent sceneMapRoot = FXMLLoader.load(getClass().getResource("piirros.fxml"));

would you need more information? I can also upload a package if that is needed.
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
package javafxapplicationfxml;

import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.control.Label;

import javafx.scene.Scene;
import javafx.stage.Stage;

 * @author ebure
public class SampleController implements Initializable {
    private Stage  stage;
    private Label label;
    private void handleButtonAction(ActionEvent event) {

       Parent sceneMapRoot = FXMLLoader.load(getClass().getResource("piirros.fxml"));
        Scene sceneMap = new Scene(sceneMapRoot,500,500);
        stage.setTitle("Welcome to game!");
        System.out.println("You clicked me!");
    public void initialize(URL url, ResourceBundle rb) {
        // TODO
Edited by: Ebure on 20.12.2012 6:22

Edited by: Ebure on 20.12.2012 7:04

Edited by: Ebure on 20.12.2012 7:06
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Jan 18 2013
Added on Dec 20 2012
1 comment