diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java index aa9b8087..15088619 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.java @@ -287,7 +287,7 @@ public class FlatTestFrame if( menuBarFactory != null ) setJMenuBar( menuBarFactory.apply( content ) ); - contentPanel.getContentPane().add( content ); + contentPanel.add( content ); pack(); setLocationRelativeTo( null ); setVisible( true ); @@ -590,9 +590,9 @@ public class FlatTestFrame } private void recreateContent() { - contentPanel.getContentPane().remove( content ); + contentPanel.remove( content ); content = contentFactory.get(); - contentPanel.getContentPane().add( content ); + contentPanel.add( content ); if( rightToLeftCheckBox.isSelected() ) rightToLeftChanged(); @@ -608,7 +608,7 @@ public class FlatTestFrame private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents dialogPane = new JPanel(); - contentPanel = new JRootPane(); + contentPanel = new JPanel(); buttonBar = new JPanel(); lookAndFeelComboBox = new LookAndFeelsComboBox(); scaleFactorComboBox = new JComboBox<>(); @@ -634,8 +634,7 @@ public class FlatTestFrame //======== contentPanel ======== { - Container contentPanelContentPane = contentPanel.getContentPane(); - contentPanelContentPane.setLayout(new MigLayout( + contentPanel.setLayout(new MigLayout( "insets 0,hidemode 3", // columns "[grow,fill]", @@ -754,7 +753,7 @@ public class FlatTestFrame // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables private JPanel dialogPane; - private JRootPane contentPanel; + private JPanel contentPanel; private JPanel buttonBar; private LookAndFeelsComboBox lookAndFeelComboBox; private JComboBox scaleFactorComboBox; diff --git a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd index 1dbbf02e..d8547776 100644 --- a/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd +++ b/flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatTestFrame.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.1.0.272" Java: "13.0.2" encoding: "UTF-8" +JFDML JFormDesigner: "7.0.2.0.298" Java: "13.0.2" encoding: "UTF-8" new FormModel { contentType: "form/swing" @@ -10,7 +10,7 @@ new FormModel { "defaultCloseOperation": 2 add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) { name: "dialogPane" - add( new FormContainer( "javax.swing.JRootPane", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "insets 0,hidemode 3" "$columnConstraints": "[grow,fill]" "$rowConstraints": "[grow,fill]"