MiGLayout « Layout « Java Swing Q&A





1. How do I control the overall size constraints of a panel with MigLayout?    stackoverflow.com

I am testing out MigLayout for a project, and I can't seem to figure out the MigLayout way of controlling the size of the whole panel which is being layed out. ...

2. How to force a component to grow in MigLayout in Java    stackoverflow.com

I have a component that is made up of various components such as a checkbox a slider and some buttons. i want to add this to a scrollpane and have the ...

3. Java: MiGLayout: How to use `hidemode`?    stackoverflow.com

I am starting out using MiGLayout for my GUI design, and one of the feature I would need is to show/hide certain components based on the state of other ...

4. MigLayout usage    stackoverflow.com

A question for those familiar with MigLayout sorry couldn't think of a more appropriate name for the question... I'm trying to create a layout that will end up looking like the ...

5. Binding MigLayout debug mode to the application's logging level?    stackoverflow.com

Debug mode in MigLayout is quite powerful option for development and debugging. It is declared by adding a keyword in layout constraints string:

new MigLayout("fill, hidemode 3, debug");
Well, it would ...

6. Can i use a single layout manager instance in swing?    stackoverflow.com

I'm using MiGLayout and being the freak i am, i was thinking if it's possible to create a single instance of the layout and use it for all my panels? Just ...

7. mig layout - span and grow/push problem    stackoverflow.com

i want 3 components laid out on 2 lines, so that the bottom component and the top-right component use all available horizontal space.

JFrame frame = new JFrame();
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.setLayout(new MigLayout("debug, fill"));
Container cp = ...

8. JScrollpane needs to shrink its width    stackoverflow.com

I have a JScrollpane that has a JPanel on the inside (and the panel contains some JLabels). I want resizing the scroll pane to actually change its size (possibly below the preferred ...

9. Open source Swing GUI builder that uses MiGlayout    stackoverflow.com

Is there an open source Java swing GUI builder that uses MiGlayout as it's layout manager? I've been trying to learn to make Swing GUI's by hand using MiGlayout but ...





10. Transparency issue with overlay panel    stackoverflow.com

I posted this question originally in the MigLayout forum since it is to some extend specific for that specific of Layout Manager, I'd say. Unfortunately it's a week old now without ...

11. how to get miglayout-swing in gradle    stackoverflow.com

i am trying to get the miglayout jar file miglayout-3.7.2-swing.jar i want only this jar. i dont want all the jars of miglayout-3.7.2 if i give "com.miglayout:miglayout:3.7.2@jar", its downloading everything. Any one help ...

12. Any way to set the z-order when using MigLayout and absolute positioning?    stackoverflow.com

I'm using MigLayout and absolute positioning to overlay a busy indicator on a panel. Sometimes the indicator appears behind the panel, sometimes in front. Is there any way to specify the ...

13. miglayout: can't get right-alignment to work    stackoverflow.com

Something's not right here. I'm trying to get the rightmost button (labeled "help" in the example below) to be right-aligned to the JFrame, and the huge buttons to have their width ...

14. JSplitPane + MiGLayout: how to enable autoresizing    stackoverflow.com

I'm doing something wrong here: I want to have two JButtons in a JSplitPane in a JPanel in a a JFrame, where the buttons fill the JSplitPane. Here's what I get when ...

15. JSplitPane + MiGLayout: how to enable proportional autoresizing    stackoverflow.com

A followup question to my other one; How do I enable proportional resizing? I thought this would work but it doesn't:

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import net.miginfocom.swing.MigLayout;

public class SplitPaneQuestion {
   ...

16. miglayout: how to ignore a component height    stackoverflow.com

Is there any way to tell MigLayout to ignore a component's height? Here's a test example: enter image description here I have an oversized component (the "big" button in the upper right) ...





17. Miglayout + hidemode 3 = unwanted autoscroll when showing controls    stackoverflow.com

I'm using 'hidemode 3' in MigLayout so that hidden components aren't visible at all (and don't have any impact on layout). I'm using this so that I can show inline errors underneath ...

18. How do you make MiGLayout behave like Wrap Layout?    stackoverflow.com

I'd like to replicate the example shown here: Wrap Layout using MiGLayout. I have tried some combinations, but I'm having a hard time making the buttons wrap automatically to new rows as the ...

19. Title collapse in TitledBorder    stackoverflow.com

I've a TitledBorder having title larger than the body. Its get cut down and the length sets as per the maximum length of the body. Suppose I have a label in the body ...

20. Java MigLayout problem    stackoverflow.com

I'm trying to build a calculator GUI using migLayout, but I'm not familiar with this layout. My problem is that my GUI is a straight line of buttons.

1 2 3 + ...

21. Remove gap to Parent Containers Border in Miglayout    stackoverflow.com

first a picture for visualizing the problem Gap Removal Problem As you can see, there is a huge gap to the parents container on the right and left side of ...

22. How to use a separator with MigLayout    stackoverflow.com

This is a MigLayout-newbie question. I'd like to know how to draw a separator from the end of a label across the width of a panel. Here's my example code:

package com.ndh.swingjunk;

import java.awt.*;
import ...

23. Swing: vertically stacked components without MigLayout    stackoverflow.com

I finally got the behavior I want for vertically stacking components that have a preferred height that changes with time. But I needed to use MigLayout. Is there a way to do ...

24. Help with transformation of Drawed Layout to MigLayout    stackoverflow.com

I’m making a sample application that uses MigLayout in a very cool way. Unfortunately after reading through the quickstart and the whitepaper I still have questions and can’t do my desired ...

25. in swing, layout components that has different heights    stackoverflow.com

We have components that have different heights, we want to show them in a way that vertically there is as little space as possible (as shown in the picture), how ...

26. SWT Miglayout Problem    stackoverflow.com

I'm using miglayout in my swt application but when the content of a text field is large it tends to push the width/height of the text field out of view, this ...

27. Force MigLayout shrink like GridBagLayout for hidden Objects    stackoverflow.com

I am trying to replace GridBagLayout with MigLayout. The problem is that if i call obj.setVisible(false) for some object im GridBaglayout, layout shrinks. But in MigLayout it just remains hidden. Do ...

28. MigLayout: Only window displayed when trying fullscreen    stackoverflow.com

Here is code:

ScreenHeight = Toolkit.getDefaultToolkit().getScreenSize().height,
ScreenWidth = Toolkit.getDefaultToolkit().getScreenSize().width;

JFrame MainFrame = new JFrame();
MainFrame.setSize(ScreenWidth, ScreenHeight);
MainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
MainFrame.setExtendedState(JFrame.MAXIMIZED_BOTH);
MainFrame.setVisible(true);

/* When set to false, all buttons and boxes are displayed, 
   otherwise only the main ...

29. miglayout grow problem    coderanch.com

In the screen print attached i am trying to make the 2 textfields circled in red grow to fill the width, but i never want it shrinking as it would all be unreadable then. But it is currently not growing at all but staying the standard size. each section with a border is a panel. I have tried setting the the ...

30. Is MiGLayout the best layout manager?    coderanch.com

I just learned about MiGLayout and am already in love with it. But then, I have not tried JGoodies FormLayout. Should I? Is the latter superior to MiGLayout in any way whatsoever? What other layouts are out there? Also - the MiGLayout claims to be for manual coders what Matisse layout is for visual editors.. now, I am using a visual ...

31. MigLayout right alignment how?    coderanch.com