2 Replies Latest reply: Feb 7, 2013 12:18 AM by 870611 RSS

    JavaFX 8.0 beta - anxious comeback of swing and awt

    870611
      Let me show, what worries me.

      About 1 year ago I saved some info about classloading in javafx 2.2.6 with -verbose parameter

      "awt" - 0 occurrences
      "swing" - 0 occurrences

      Today I did the same with fx 8.0 (build 25), and results really make me UNhappy

      "awt" - 56 occurrences
      "swing" - 12 occurrences

      In both cases I used the same application with one button.


      Who know about this regression?

      I guess it has relation with abnormal overweight of jfx 8.0 - simple app with one button now uses 65-70 mb of memory^(

      Tnx!

      Edited by: anatolnsk on Feb 6, 2013 12:57 PM
        • 1. Re: JavaFX 8.0 beta - anxious comeback of swing and awt
          jsmith
          Interesting finding anatolnsk

          Can you share the sample program you use and build/execution procedures for it?

          Thanks!
          • 2. Re: JavaFX 8.0 beta - anxious comeback of swing and awt
            870611
            import javafx.application.Application;
            import javafx.event.ActionEvent;
            import javafx.event.EventHandler;
            import javafx.scene.Scene;
            import javafx.scene.control.Button;
            import javafx.scene.layout.StackPane;
            import javafx.stage.Stage;
            
            public class JavaFXApplication11 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);
                }
            }