| 1 | |
package net.miginfocom.demo; |
| 2 | |
|
| 3 | |
import net.miginfocom.layout.CC; |
| 4 | |
import net.miginfocom.swing.MigLayout; |
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
import javax.swing.DefaultListModel; |
| 10 | |
import javax.swing.JButton; |
| 11 | |
import javax.swing.JFrame; |
| 12 | |
import javax.swing.JLabel; |
| 13 | |
import javax.swing.JList; |
| 14 | |
import javax.swing.JPanel; |
| 15 | |
import javax.swing.JScrollPane; |
| 16 | |
import javax.swing.JSlider; |
| 17 | |
import javax.swing.JSpinner; |
| 18 | |
import javax.swing.JTabbedPane; |
| 19 | |
import javax.swing.JTree; |
| 20 | |
import javax.swing.SpinnerNumberModel; |
| 21 | |
import javax.swing.border.EmptyBorder; |
| 22 | |
import net.miginfocom.layout.AC; |
| 23 | |
import net.miginfocom.layout.LC; |
| 24 | |
|
| 25 | |
|
| 26 | |
import net.miginfocom.swing.MigLayout; |
| 27 | |
|
| 28 | |
import javax.swing.*; |
| 29 | |
import java.awt.*; |
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
public class Test |
| 37 | |
{ |
| 38 | |
public static void main(String[] args) |
| 39 | |
{ |
| 40 | |
JFrame frame = new JFrame(); |
| 41 | |
|
| 42 | |
JPanel panel = new JPanel(new MigLayout("debug, align right")); |
| 43 | |
panel.add(new JLabel("Three"), "wrap"); |
| 44 | |
panel.add(new JLabel("Six")); |
| 45 | |
|
| 46 | |
frame.add(panel); |
| 47 | |
frame.setBounds(500, 500, 500, 500); |
| 48 | |
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); |
| 49 | |
frame.setVisible(true); |
| 50 | |
} |
| 51 | |
} |