import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import cz.autel.dmi.*;
import javax.swing.border.*;

/*
 * Demo for using HIGLayout.
 * @author daniel.michalik@autel.cz
 */
public class Demo2Dialog extends JDialog {
	public Demo2Dialog() {		
		JPanel p1 = new JPanel();
		int w1[] = {12, 0, 150, -6, 11,-4, 11};
		int h1[] = {12, 0, 5, 200, 17, 0, 11};
		HIGLayout l1 = new HIGLayout(w1, h1);
		l1.setColumnWeight(3,1);
		l1.setRowWeight(4,1);
		p1.setLayout(l1);
		HIGConstraints c = new HIGConstraints();

		p1.add(new JLabel("Do You like HIGLayout?"), c.rcwh(2,2,5,1,""));
		p1.add(new JScrollPane(new JTextArea()), c.rcwh(4,2,5,1));
		p1.add(new JButton("Help"), c.rc(6,2));
		p1.add(new JButton("OK"), c.rc(6,4));
		p1.add(new JButton("Cancel"), c.rc(6,6));

		getContentPane().add(p1, BorderLayout.CENTER);		
	}
}
