Questions tagged [miglayout]

MiG Layout is a free and open-source layout manager for Java Swing, SWT, JavaFX2, Fantom, Qt and other GUI toolkits.

MiG Layout is a free and open-source layout manager for many GUI toolkits. Its aim is to allow you to create advanced GUI layouts that are maintainable and flexible.

http://www.miglayout.com/

398 questions
4
votes
1 answer

MigLayout: unexpected layout beside a vertical spanning component

While playing a bit to demonstrate how to easily fulfil a layout requirment with MigLayout, I was surprised by the outcome of: MigLayout layout = new MigLayout("wrap 3, debug"); JComponent content = new JPanel(layout); content.add(new…
kleopatra
  • 51,061
  • 28
  • 99
  • 211
4
votes
2 answers

How to remove space between components in MiGLayout

I haven't used MiGLayout in a while and I can't remember how to remove the space that gets put in automatically between components. I tried using the following parameters to no avail (note that I want to keep the horizontal…
Jumbala
  • 4,764
  • 9
  • 45
  • 65
4
votes
2 answers

Span/Grow bug in MigLayout?

The following is close to what I want, and does what I expect: import javax.swing.JComboBox; import javax.swing.JPanel; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextField; import…
Draemon
  • 33,955
  • 16
  • 77
  • 104
4
votes
2 answers

MigLayout resizing with JScrollPane

I searched a little bit and did not find a good answer to my problem. I am working on a gui that has to be resizable. It contains a status JTextArea that is inside a JScrollPane. And this is my problem. As long as I don't manually resize my JFrame,…
brimborium
  • 9,362
  • 9
  • 48
  • 76
4
votes
2 answers

Java + Miglayout - top margin border issue?

I have problem with margin. Probably its very easy to solve, but i dont know what is the cause. I have four components, three jscrollpanels and one jpanel. Components are placed like this: Problem is marked with red ellipse. How to wipe this margin…
marxin
  • 3,692
  • 3
  • 31
  • 44
4
votes
2 answers

How do I layout a panel on the top of my Dialog so that it has two buttons?

I need to layout a panel on the top of my Dialog so that it has two buttons (Save and Cancel). I want the save to be on the left and Cancel to be on the right side. I've created a JPanel using the MigLayout and docked it to the north of the content…
Allain Lalonde
  • 91,574
  • 70
  • 187
  • 238
3
votes
3 answers

JTable not showing column titles

This is my first time working with GUI, so I'm not exactly sure what is causing the problem. I have an assignment from my Uni. The project is to make a sort of "Product management" program for various purposes. The whole thing is done except the…
vedran
  • 2,167
  • 9
  • 29
  • 47
3
votes
2 answers

MiGLayout multiple components on border

I have a MigLayout that I'd like to add components to dynamically, while keeping two buttons at the bottom of the frame (because that's intuitive). Firstly, I'd like to know if what I'm currently doing is the best way to go about it, and secondly…
Chris Browne
  • 1,582
  • 3
  • 15
  • 33
3
votes
1 answer

Need button to stay at the bottom of my dialog

I originally posted this question on the miglayout forum and after 534 views and no answers, I decided to try it there ;-) I tried to extend the "initial example" from the MigLayout whitepaper in order to add an "OK" button that would always stay on…
laurent kubaski
  • 304
  • 3
  • 11
3
votes
1 answer

When using MigLayout, how would a 3rd int parameter to `add` affect layout?

For example: layeredPane.setLayout(new MigLayout()); layeredPane.add(component, "pos 50 50, width 100, height 100", 0); The 0 in this case does affect the component's layering, but I can't seem to figure out exactly how. I would like to overlay…
rtheunissen
  • 7,347
  • 5
  • 34
  • 65
3
votes
1 answer

Can't add JPanel to JFrame on the fly

I have to views: MainWindowView (extends JFrame) ScanOptimisationView (extends JPanel) So, I have the combobox in MainWindowView class. And I create ActionListener and bind it to this combobox. actionPerfomed() method of this ActionListener tries…
Dmitry Belaventsev
  • 6,347
  • 12
  • 52
  • 75
3
votes
1 answer

Java Swing - MigLayout: Docking a component in center isn't fully centering

I am attempting to design a panel with MiGFormat that has a label at the top, and two buttons at the bottom - a yes/no prompt. I achieve this closely, but the label yesOrNoText (text is "TEST") is not fully centered: I initialize the panel…
3
votes
1 answer

MigLayout - Need help on how to use the dock parameters (or need an alternative)

I just started using MigLayout for SWING in Java and I'm really liking it so far. The only thing, though, is that the dock parameters don't seem to work the way I thought they worked and I can't figure out what I'm doing wrong. The problem is: I'm…
Jumbala
  • 4,764
  • 9
  • 45
  • 65
3
votes
3 answers

How can I force 4 cells per row with equal width in Miglayout when only one cell is used?

I got a panel with a dynamic width. Components added to the panel should be arranged left-to-right up to 4 components (cells) per row, where each component/cell fill 25% of the panels width. If there is only one component, it should fill 25% of the…
Marcus Persson
  • 373
  • 4
  • 20
3
votes
1 answer

Transparency issue with overlay panel

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 any comments at all, thus I'd like to repost the question here, in…
ChristianS
  • 273
  • 1
  • 2
  • 7