I'm using Window Builder with palette to add GroupLayout to a JPanel that is using a JScrollPane for auto resize, and for some reason it didn't work only in this case. What did I do wrong?
JPanel panel = new JPanel();
panel.setLayout(null);
JScrollPane BestAntscrollPane = new JScrollPane();
BestAntscrollPane.setBounds(12, 91, 1647, 1500);
panel.add(BestAntscrollPane);
JPanel BestAntPanel = new JPanel();
BestAntscrollPane.setColumnHeaderView(BestAntPanel);
BestAntPanel.setLayout(null);
BestAntscrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
BestAntPanel.setPreferredSize(new Dimension(512,2500));
GroupLayout gl_BestAntPanel = new GroupLayout(BestAntPanel);
gl_BestAntPanel.setHorizontalGroup(
gl_BestAntPanel.createParallelGroup(Alignment.LEADING)
.addGap(0, 1624, Short.MAX_VALUE)
);
gl_BestAntPanel.setVerticalGroup(
gl_BestAntPanel.createParallelGroup(Alignment.LEADING)
.addGap(0, 2500, Short.MAX_VALUE)
);
BestAntPanel.setLayout(gl_BestAntPanel);
BestAntPanel.setVisible(false);