}
if (m_NumEditable == 0) {
JLabel empty = new JLabel("No editable properties",
SwingConstants.CENTER);
Dimension d = empty.getPreferredSize();
empty.setPreferredSize(new Dimension(d.width * 2, d.height * 2));
empty.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 10));
GridBagConstraints gbConstraints = new GridBagConstraints();
gbConstraints.anchor = GridBagConstraints.CENTER;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.gridy = componentOffset; gbConstraints.gridx = 0;
gbLayout.setConstraints(empty, gbConstraints);
scrollablePanel.add(empty);
}
validate();
// sometimes, the calculated dimensions seem to be too small and the
// scrollbars show up, though there is still plenty of space on the
// screen. hence we increase the dimensions a bit to fix this.
Dimension dim = scrollablePanel.getPreferredSize();
dim.height += 20;
dim.width += 20;
scrollPane.setPreferredSize(dim);
validate();