Skip to content

Commit

Permalink
Increased preferred width of panel to prevent the content from being …
Browse files Browse the repository at this point in the history
…squeezed
  • Loading branch information
mtygesen committed Oct 8, 2023
1 parent d8ca3ba commit 8b3d7f9
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,16 @@ public void fireDone(boolean cancelled) {
drawButton.requestFocus();

setContentPane(mainPanel);

int extraWidth = 100;

Dimension preferredSize = mainPanel.getPreferredSize();
int preferredWidth = preferredSize.width + extraWidth;
int preferredHeight = preferredSize.height;

Dimension newPreferredSize = new Dimension(preferredWidth, preferredHeight);

mainPanel.setPreferredSize(newPreferredSize);
}

private void initAdvancedOptionsPanel() {
Expand Down Expand Up @@ -567,8 +577,6 @@ private void initSpacingSelecters(){
gbc.insets = new Insets(10, 20, 10, 0);
gbc.anchor = GridBagConstraints.NORTHWEST;

spacingPanel.setPreferredSize(new Dimension(400, getHeight()));

mainPanel.add(spacingPanel, gbc);
}

Expand Down

0 comments on commit 8b3d7f9

Please sign in to comment.