Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spacing in 5.0 for swing much greater #43

Open
tbee opened this issue Feb 17, 2016 · 4 comments
Open

Spacing in 5.0 for swing much greater #43

tbee opened this issue Feb 17, 2016 · 4 comments

Comments

@tbee
Copy link
Collaborator

tbee commented Feb 17, 2016

I recently upgraded one of my applications to MigLayout 5.0 and the users complain that the fields didn't fit on the screen anymore. Attached are screenshots of the same screen under 3.7.3, 4.2 and 5.0 and it is clearly visible under 5.0 the spacing is almost double.

3 7 3
4 2
5 0

@JFormDesigner
Copy link
Collaborator

I think the gaps are larger since this commit 3dcc687

You can restore the old gaps in your app:

PlatformDefaults.setRelatedGap(LPX4, LPY4);
PlatformDefaults.setUnrelatedGap(LPX7, LPY9);
PlatformDefaults.setParagraphGap(LPX14, LPY14);
PlatformDefaults.setIndentGap(LPX9, LPY9);
PlatformDefaults.setGridCellGap(LPX4, LPY4);

@tbee
Copy link
Collaborator Author

tbee commented Feb 17, 2016

That commit indeed has a big space increase.

@andrewmathies
Copy link

Hello, I think I am experiencing a similar problem. I am using MigLayout and it is frequently creating too much space between components. When I copied in the 5 lines you have above @JFormDesigner Java told me it couldn't find any of the symbols, including PlatformDefaults.

@aley2003
Copy link

With MigLayout 11.0 I fixed the Problem for Windows Swing with
PlatformDefaults.setRelatedGap( new UnitValue(4, UnitValue.LPX, null), new UnitValue(4, UnitValue.LPY, null)); PlatformDefaults.setUnrelatedGap( new UnitValue(7, UnitValue.LPX, null), new UnitValue(9, UnitValue.LPY, null)); PlatformDefaults.setParagraphGap( new UnitValue(14, UnitValue.LPX, null), new UnitValue(14, UnitValue.LPY, null)); PlatformDefaults.setIndentGap( new UnitValue(9, UnitValue.LPX, null), new UnitValue(9, UnitValue.LPY, null)); PlatformDefaults.setGridCellGap( new UnitValue(4, UnitValue.LPX, null), new UnitValue(4, UnitValue.LPY, null));
in a static block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants