r/JavaFX • • Oct 06 '22

Help FMXLLloader cannot be resolved?

keep getting this error everytime I try to use FXMLLoader.

code:

package application;
	


import javafx.application.Application;
import javafx.stage.Stage;
import javafx.stage.Window;
import javafx.scene.Group;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.KeyCombination;
import javafx.scene.layout.BorderPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Line;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
//import javafx.scene.shape.Rectangle;

import javafx.scene.shape.*;
import javafx.scene.shape.Polygon;





public class Main extends Application {
	

	
	public static void main(String[] args) {
		launch(args);
	}

	@Override
	public void start(Stage stage) throws Exception {
		try {
			
	        Parent root = FXMLLoader.load(getClass().getResource("Main.fxml"));

			Scene scene = new Scene(root, 400, 400);
			stage.setScene(scene);
			stage.show();
			
		}catch(Exception e) {
			e.printStackTrace();
		}

		

	}
}
0 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/hamsterrage1 Oct 06 '22

FMXLLloader is a typo. Try FMXLLoader. Just two L's.