Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package net.miginfocom.examples;
 
 
 import javax.swing.*;
 import java.awt.Color;

Author(s):
Mikael Grev, MiG InfoCom AB Date: 14-06-03 Time: 21:31
public class MigLayoutBug
	public static void main(String[] args)
	{
		JFrame frame = new JFrame();
		frame.setSize(500, 500);
		JPanel mainPanel = new JPanel(new MigLayout("debug"""""));
		JPanel greyPanel = new JPanel();
		JTextArea label = new JTextArea("text \n" +
		           "over \n" +
		           "two \n" +
		           "rows");
		mainPanel.add(label"spany 2");
		mainPanel.add(new JLabel("First row"), "wrap");
		mainPanel.add(new JLabel("Second row"), "wrap");
		mainPanel.add(greyPanel"spanx 2, pushy, grow");
		frame.setContentPane(mainPanel);
		frame.setVisible(true);
	}
New to GrepCode? Check out our FAQ X