swingeclipse-pluginbracketswindowbuilder

Stop WindowBuilder for Eclipse putting components inside brackets


Is there a way to stop WindowBuilder for Eclipse putting components (JButton, JComboBox etc.) inside brackets when adding them to design?

{
    JScrollPane scrollPane = new JScrollPane();
    contentPanel.add(scrollPane, BorderLayout.CENTER);

    {
        table = new JTable();
        scrollPane.setViewportView(table);
    }
}

Solution

  • In the preferences, Windowbuilder/Swing/Code Generation, set the Statement generation to Flat (which is the default):

    enter image description here