This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 241554 - Main javafx class is not recognized when this is heredity from superclass:Browse JavaFX Application Classes fail
Summary: Main javafx class is not recognized when this is heredity from superclass:Bro...
Status: RESOLVED DUPLICATE of bug 237644
Alias: None
Product: javafx
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Roman Svitanic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-07 22:15 UTC by albert.af77
Modified: 2014-02-10 08:17 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of the dialog Browse JavaFX Application Classes, my main class that is not reconigzed by NetBeans (38.58 KB, image/png)
2014-02-07 22:15 UTC, albert.af77
Details

Note You need to log in before you can comment on or make changes to this bug.
Description albert.af77 2014-02-07 22:15:19 UTC
Created attachment 144924 [details]
Screenshot of the dialog Browse JavaFX Application Classes, my main class that is not reconigzed by NetBeans

I have a class that extends of an abstract class, and that finally extends the javafx.application.Application class

But is not recognized by NetBeans, when i am training launch the project.

EXAMPLE
FIRST CLASS
public class MyClassLevelA extends Application {
    
    @Override
    public void start(Stage primaryStage) {
        Button btn = new Button();
        btn.setText("Say 'Hello World'");
        btn.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent event) {
                System.out.println("Hello World!");
            }
        });
        StackPane root = new StackPane();
        root.getChildren().add(btn);
        
        Scene scene = new Scene(root, 300, 250);
        
        primaryStage.setTitle("Hello World!");
        primaryStage.setScene(scene);
        primaryStage.show();
    }

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

SECOND CLASS

public class JavaFXApplication2 extends com.libreries.MyClassLevelA {

    @Override
    public void start(Stage primaryStage) {
        super.start(primaryStage); 
    }
    public static void main(String[] args) {
        launch(args);
    }

}
Comment 1 Roman Svitanic 2014-02-10 08:17:23 UTC

*** This bug has been marked as a duplicate of bug 237644 ***