Changes between Version 1 and Version 2 of JComponentEnvironment


Ignore:
Timestamp:
05/17/13 16:20:59 (6 years ago)
Author:
welberge
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • JComponentEnvironment

    v1 v2  
    11= JComponentEnvironment and constructing Swing user interfaces using the VirtualHumanSpec = 
     2The JComponentEnvironment can be used to set up the user interface layout of demo in which the different UI elements are later filled out using the XML specification. The layout can be created using JPanels: 
     3{{{ 
     4final JComponentEnvironment jce = new JComponentEnvironment(); 
     5        try 
     6        { 
     7            SwingUtilities.invokeAndWait(new Runnable() 
     8            { 
     9 
     10                @Override 
     11                public void run() 
     12                { 
     13                    JPanel jPanel = new JPanel(); 
     14                    jce.registerComponent("panel1", jPanel); 
     15                    mainJFrame.setLayout(new BorderLayout()); 
     16                    mainJFrame.add(jPanel, BorderLayout.SOUTH); 
     17                } 
     18            }); 
     19        } 
     20        catch (InvocationTargetException e) 
     21        { 
     22            throw new RuntimeException(e); 
     23        } 
     24        catch (InterruptedException e) 
     25        { 
     26            throw new RuntimeException(e); 
     27        } 
     28}}}