KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > gumby > test > SplitPaneTest


1 package org.sapia.gumby.test;
2
3 import java.awt.BorderLayout JavaDoc;
4 import java.io.File JavaDoc;
5
6 import javax.swing.JFrame JavaDoc;
7 import javax.swing.JSplitPane JavaDoc;
8
9 import org.sapia.gumby.RenderContextFactory;
10
11 /**
12  * @author Yanick Duchesne
13  *
14  * <dl>
15  * <dt><b>Copyright: </b>
16  * <dd>Copyright &#169; 2002-2005 <a HREF="http://www.sapia-oss.org">Sapia Open
17  * Source Software </a>. All Rights Reserved.</dd>
18  * </dt>
19  * <dt><b>License: </b>
20  * <dd>Read the license.txt file of the jar or visit the <a
21  * HREF="http://www.sapia-oss.org/license.html">license page </a> at the Sapia
22  * OSS web site</dd>
23  * </dt>
24  * </dl>
25  */

26 public class SplitPaneTest {
27
28   public static void main(String JavaDoc[] args) {
29     try {
30       JFrame JavaDoc frame = FrameHelper.newFrame("SplitPane");
31       JSplitPane JavaDoc split = (JSplitPane JavaDoc) RenderContextFactory.newInstance()
32           .render(new File JavaDoc("etc/test/jsplitpane.xml"));
33       split.setDividerLocation(100);
34       frame.getContentPane().add(split, BorderLayout.CENTER);
35
36       frame.setSize(400, 400);
37       frame.setVisible(true);
38     } catch(Exception JavaDoc e) {
39       e.printStackTrace();
40     }
41   }
42
43 }
44
Popular Tags