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

IllegalArgumentException in ver 5.2 (OK in ver 5.1) #65

Open
PerBalling opened this issue May 9, 2019 · 2 comments
Open

IllegalArgumentException in ver 5.2 (OK in ver 5.1) #65

PerBalling opened this issue May 9, 2019 · 2 comments

Comments

@PerBalling
Copy link

When using MigLayout ver 5.2 in pom.xml for
https://sourceforge.net/p/jgpstrackedit/code/ci/master/tree/
class DlgMerge:

import net.miginfocom.swing.MigLayout;

public class DlgMerge extends JDialog {
...
contentPanel.setLayout(new MigLayout("", "[][]", "[][][][]"));
...
this.pack();
...
}

=>

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Width and height must be >= 0
at java.awt.Component.getBaseline(Unknown Source)
at javax.swing.JComponent.getBaseline(Unknown Source)
at javax.swing.plaf.basic.BasicComboBoxUI.getBaseline(Unknown Source)
at javax.swing.JComponent.getBaseline(Unknown Source)
at net.miginfocom.swing.SwingComponentWrapper.getBaseline(Unknown Source)
at net.miginfocom.layout.Grid$CompWrap.getBaseline(Unknown Source)
at net.miginfocom.layout.Grid$CompWrap.access$5000(Unknown Source)
at net.miginfocom.layout.Grid.getBaselineAboveBelow(Unknown Source)
at net.miginfocom.layout.Grid.access$4500(Unknown Source)
at net.miginfocom.layout.Grid$LinkedDimGroup.getMinPrefMax(Unknown Source)
at net.miginfocom.layout.Grid$LinkedDimGroup.access$3300(Unknown Source)
at net.miginfocom.layout.Grid.getTotalGroupsSizeParallel(Unknown Source)
at net.miginfocom.layout.Grid.calcRowsOrColsSizes(Unknown Source)
at net.miginfocom.layout.Grid.calcGridSizes(Unknown Source)
at net.miginfocom.layout.Grid.checkSizeCalcs(Unknown Source)
at net.miginfocom.layout.Grid.layoutImpl(Unknown Source)
at net.miginfocom.layout.Grid.layout(Unknown Source)
at net.miginfocom.swing.MigLayout.layoutContainer(Unknown Source)
at java.awt.Container.layout(Unknown Source)
at java.awt.Container.doLayout(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validate(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

@tbee
Copy link
Collaborator

tbee commented May 9, 2019

Hm. I'm getting those as well. Thought it was a bug in my layout code somehow.

@mikaelgrev
Copy link
Owner

I have pushed a simple fix that will at least not throw an exception.

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

3 participants