1 package org.sapia.gumby.test; 2 3 import java.awt.BorderLayout ; 4 import java.io.File ; 5 6 import javax.swing.JFrame ; 7 import javax.swing.JSplitPane ; 8 9 import org.sapia.gumby.RenderContextFactory; 10 11 26 public class SplitPaneTest { 27 28 public static void main(String [] args) { 29 try { 30 JFrame frame = FrameHelper.newFrame("SplitPane"); 31 JSplitPane split = (JSplitPane ) RenderContextFactory.newInstance() 32 .render(new File ("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 e) { 39 e.printStackTrace(); 40 } 41 } 42 43 } 44 | Popular Tags |