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
5
votes
1 answer

How to force a component to grow in MigLayout in Java

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 slider grow to fill all the remaining space. This is no problem as this code demonstrates : …
Savvas Dalkitsis
  • 11,476
  • 16
  • 65
  • 104
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
  • 606
  • 6
  • 17
5
votes
1 answer

Automatic wrapping using MigLayout

I'm 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 vertically). The JScrollPane contains any number of JPanels which are arranged horizontally -…
maloney
  • 1,633
  • 3
  • 26
  • 49
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,488
  • 1
  • 17
  • 54
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
  • 7,347
  • 5
  • 34
  • 65
4
votes
3 answers

Layout with auto-wrap within JScrollBar

I'm trying to build a panel with components laid out horizontally, with auto-wrap if not enough place and a vertical scrollbar. Something like this: +-----------------+ |[1][2][3][4][5] | | | +-----------------+ reducing the…
lvr123
  • 524
  • 6
  • 24
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
  • 184,598
  • 164
  • 608
  • 970
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
  • 373
  • 5
  • 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
  • 6,301
  • 3
  • 18
  • 25
4
votes
1 answer

Prevent JLabels from Growing in MigLayout

I am trying to create a form in MigLayout. I want for any text fields to be labeled with a small JLabel preceding it, with the text field growing as space is available. I am successfully able to do this in the following code: JFrame frame = new…
Thunderforge
  • 19,637
  • 18
  • 83
  • 130
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,837
  • 5
  • 44
  • 56
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
  • 2,020
  • 4
  • 25
  • 33
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
  • 3
  • 12
  • 20
1 2
3
26 27