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/

386 questions
5
votes
1 answer

How to show JLabel ellipsis in MigLayout?

Using the default layout manager, the JLabel shows its ellipsis when the frame is resized. As illustrated by: public static void main(String[] args) { final JFrame jFrame = new JFrame("JLabel, show me your ellipsis!"); …
Pigelvy
  • 596
  • 5
  • 16
5
votes
1 answer

Automatic wrapping using MigLayout

Im looking to wrap a JPanel when it reaches the 'edge' of the screen using MigLayout. At the moment I have a JScrollPane (which i only want to be enabled veritcally). The JScrollPane contains any number of JPanels which are arranged Horizontally -…
maloney
  • 1,455
  • 2
  • 22
  • 43
4
votes
1 answer

MigLayout Shrink Behavior

with the JPanel defined below (embedded in a JTabPanel in a JSplitPane): If I maximize, the panel is redrawn correctly to the new dimensions If I minimize the panel is NOT redrawn to the previous dimensions If I drag the corner to increase the size…
ed4becky
  • 1,078
  • 10
  • 38
4
votes
2 answers

Intercepting or delegating events with overlapping components

I have two JPanels equal in size, one over the top of the other. The top layer serves as a drag selection panel, and the other one has other components added to it. My problem is that the mouse event handlers of these added components aren't…
rtheunissen
  • 6,831
  • 5
  • 30
  • 60
4
votes
2 answers

JSplitPane + MiGLayout: how to enable proportional autoresizing

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…
Jason S
  • 171,795
  • 155
  • 551
  • 900
4
votes
5 answers

Is there a way to insert a "cell" in MigLayout?

I am trying to create a panel that can dynamically insert components based on events. The panel is row based with variable amount of components per row. However, I have problems inserting components between existing ones. For example, if I have…
Emilis Panovas
  • 342
  • 3
  • 15
4
votes
2 answers

MigLayout: How to *vertically* align multiple components inside a dock?

MigLayout supports adding multiple components to a dock. I want to add multiple components to the west dock, from top to bottom. However, it seems as if MigLayout can only manage a horizontal layout inside a dock. I tried many parameters (e.g.,…
cubic lettuce
  • 5,116
  • 2
  • 14
  • 23
4
votes
1 answer

MigLayout and vertically centered components

I want to center buttons as shown below: Here is my code: import java.awt.Dimension; import javax.swing.*; import net.miginfocom.swing.MigLayout; public class MigLayoutTest extends JFrame { public static void main(String[] args) { …
hold3n
  • 65
  • 3
4
votes
2 answers

JTextarea not growing vertically using miglayout

This is the code for a simple notepad in swing using miglayout.I have used span and grow to fill the horizontal space but fill and grow are not working as row constraints.Why? I want the textarea to fill all the available space in it's both minimum…
crazy4
  • 135
  • 1
  • 2
  • 10
4
votes
1 answer

How to calculate width by MigLayout manually

I'm using MigLayout 4 Android in my android project. There is a bug in that code: if a child layout nested in a parent layout, the constraints like fill, grow will be ignored, because mig4android simply ignored them. I'm trying to fix it, but I…
itang
  • 41
  • 1
4
votes
3 answers

How do I control the overall size constraints of a panel with MigLayout?

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. I am adapting the example in the MigLayout whitepaper. Also, I am writing in Python and…
Instance Hunter
  • 7,621
  • 5
  • 39
  • 52
4
votes
1 answer

TextField size and vertical align

I use MigLayout on a DialogBox. Every panel uses MigLayout. There is a panel for the show row. There is a panel for every column (delivery type, choose element, Sortie). There is a panel for the output file row. There is a panel for button. Maybe…
redfox26
  • 1,850
  • 3
  • 23
  • 31
4
votes
2 answers

Dynamically rearrange layout with Swing

I am building a desktop app with Swing with similar functionality to Twitter. I have a "feed" page where "tweets" are displayed. I have the "tweets" in a JPanel and want to dynamically display new ones coming in by placing new "tweets" at the top of…
nomel7
  • 1,523
  • 2
  • 12
  • 19
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
  • 49,346
  • 26
  • 88
  • 189
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…
Adam Smith
  • 4,432
  • 8
  • 41
  • 64
1 2
3
25 26