root / branches / F2 / extensions / extJCRS / src-test / org / gvsig / crs / gui / wizard / FrameMain.java @ 10786
History | View | Annotate | Download (1.66 KB)
1 |
package org.gvsig.crs.gui.wizard; |
---|---|
2 |
|
3 |
|
4 |
import java.awt.event.WindowAdapter; |
5 |
import java.awt.event.WindowEvent; |
6 |
|
7 |
import javax.swing.ImageIcon; |
8 |
import javax.swing.JFrame; |
9 |
import javax.swing.JPanel; |
10 |
import javax.swing.UIManager; |
11 |
import javax.swing.UnsupportedLookAndFeelException; |
12 |
|
13 |
import org.gvsig.crs.gui.panels.wizard.DefCrsUsr; |
14 |
import org.gvsig.crs.gui.panels.wizard.MainPanel; |
15 |
|
16 |
public class FrameMain { |
17 |
|
18 |
|
19 |
/**
|
20 |
* @param args
|
21 |
* @throws UnsupportedLookAndFeelException
|
22 |
* @throws IllegalAccessException
|
23 |
* @throws InstantiationException
|
24 |
* @throws ClassNotFoundException
|
25 |
*/
|
26 |
public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException { |
27 |
|
28 |
/*
|
29 |
com.sun.java.swing.plaf.motif.MotifLookAndFeel
|
30 |
com.sun.java.swing.plaf.windows.WindowsLookAndFeel
|
31 |
javax.swing.plaf.metal.MetalLookAndFeel
|
32 |
*/
|
33 |
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); |
34 |
JFrame frame = new JFrame("Asistente de Definici?n de Crs"); |
35 |
//cerrar el formulario
|
36 |
frame.addWindowListener(new WindowAdapter() { |
37 |
public void windowClosing(WindowEvent e) {System.exit(0);} |
38 |
}); |
39 |
frame.getContentPane().add(new MainPanel());
|
40 |
frame.setSize(300,500); |
41 |
//colocar en la pantalla
|
42 |
frame.setLocation(300,0); |
43 |
frame.pack(); |
44 |
frame.setVisible(true);
|
45 |
System.out.println("Tama?o preferred del frame es: "+frame.getPreferredSize()); |
46 |
System.out.println("Tama?o maximo "+frame.getMaximumSize()); |
47 |
System.out.println("Tama?o minimo "+frame.getMinimumSize()); |
48 |
|
49 |
} |
50 |
|
51 |
} |