/Users/lyon/j4p/src/classUtils/loaders/DistributedComputationController.java

1    /** 
2     * Created by IntelliJ IDEA. 
3     * User: dlyon 
4     * Date: Nov 12, 2003 
5     * Time: 3:18:58 PM 
6     * To change this template use Options | File Templates. 
7     */ 
8    package classUtils.loaders; 
9     
10   import gui.ClosableJFrame; 
11   import gui.run.RunList; 
12   import gui.run.RunButton; 
13    
14   import javax.swing.*; 
15   import java.awt.*; 
16   import java.util.Vector; 
17    
18   public class DistributedComputationController { 
19       DistributedComputationController() { 
20           displayGui(); 
21       } 
22    
23       public void displayGui() { 
24           ClosableJFrame cf = new ClosableJFrame(); 
25    
26           Container c = cf.getContentPane(); 
27           c.setLayout(new BorderLayout()); 
28           c.add(getListPanel(), BorderLayout.CENTER); 
29           c.add(getButtonControlPanel(), BorderLayout.SOUTH); 
30           cf.setSize(200, 200); 
31           cf.show(); 
32       } 
33    
34       public JPanel getListPanel() { 
35           JPanel jp = new JPanel(); 
36           String list[] = {"this", "is", "a", "test"}; 
37           jp.add(new RunList(list) { 
38               public void run() { 
39    
40               } 
41           }); 
42           jp.setLayout(new FlowLayout()); 
43           return jp; 
44       } 
45    
46       public JPanel getButtonControlPanel() { 
47           JPanel jp = new JPanel(); 
48           jp.setLayout(new FlowLayout()); 
49           jp.add(new RunButton("cancel") { 
50               public void run() { 
51    
52               } 
53           }); 
54           jp.add(new RunButton("ok") { 
55               public void run() { 
56    
57               } 
58           }); 
59           return jp; 
60       } 
61    
62       public static void main(String args[]) { 
63           new DistributedComputationController(); 
64       } 
65   } 
66