FlatTestFrame: removed no longer needed nested JRootPane (was used for UI inspector)

This commit is contained in:
Karl Tauber
2020-06-08 16:03:04 +02:00
parent 8424300b5f
commit 2443547b3b
2 changed files with 8 additions and 9 deletions

View File

@@ -287,7 +287,7 @@ public class FlatTestFrame
if( menuBarFactory != null ) if( menuBarFactory != null )
setJMenuBar( menuBarFactory.apply( content ) ); setJMenuBar( menuBarFactory.apply( content ) );
contentPanel.getContentPane().add( content ); contentPanel.add( content );
pack(); pack();
setLocationRelativeTo( null ); setLocationRelativeTo( null );
setVisible( true ); setVisible( true );
@@ -590,9 +590,9 @@ public class FlatTestFrame
} }
private void recreateContent() { private void recreateContent() {
contentPanel.getContentPane().remove( content ); contentPanel.remove( content );
content = contentFactory.get(); content = contentFactory.get();
contentPanel.getContentPane().add( content ); contentPanel.add( content );
if( rightToLeftCheckBox.isSelected() ) if( rightToLeftCheckBox.isSelected() )
rightToLeftChanged(); rightToLeftChanged();
@@ -608,7 +608,7 @@ public class FlatTestFrame
private void initComponents() { private void initComponents() {
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
dialogPane = new JPanel(); dialogPane = new JPanel();
contentPanel = new JRootPane(); contentPanel = new JPanel();
buttonBar = new JPanel(); buttonBar = new JPanel();
lookAndFeelComboBox = new LookAndFeelsComboBox(); lookAndFeelComboBox = new LookAndFeelsComboBox();
scaleFactorComboBox = new JComboBox<>(); scaleFactorComboBox = new JComboBox<>();
@@ -634,8 +634,7 @@ public class FlatTestFrame
//======== contentPanel ======== //======== contentPanel ========
{ {
Container contentPanelContentPane = contentPanel.getContentPane(); contentPanel.setLayout(new MigLayout(
contentPanelContentPane.setLayout(new MigLayout(
"insets 0,hidemode 3", "insets 0,hidemode 3",
// columns // columns
"[grow,fill]", "[grow,fill]",
@@ -754,7 +753,7 @@ public class FlatTestFrame
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
private JPanel dialogPane; private JPanel dialogPane;
private JRootPane contentPanel; private JPanel contentPanel;
private JPanel buttonBar; private JPanel buttonBar;
private LookAndFeelsComboBox lookAndFeelComboBox; private LookAndFeelsComboBox lookAndFeelComboBox;
private JComboBox<String> scaleFactorComboBox; private JComboBox<String> scaleFactorComboBox;

View File

@@ -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 { new FormModel {
contentType: "form/swing" contentType: "form/swing"
@@ -10,7 +10,7 @@ new FormModel {
"defaultCloseOperation": 2 "defaultCloseOperation": 2
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) { add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class java.awt.BorderLayout ) ) {
name: "dialogPane" 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" "$layoutConstraints": "insets 0,hidemode 3"
"$columnConstraints": "[grow,fill]" "$columnConstraints": "[grow,fill]"
"$rowConstraints": "[grow,fill]" "$rowConstraints": "[grow,fill]"