/[classpath]/classpath/examples/gnu/classpath/examples/swing/Demo.java
ViewVC logotype

Diff of /classpath/examples/gnu/classpath/examples/swing/Demo.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by rabbit78, Thu May 12 19:50:05 2005 UTC revision 1.10 by rabbit78, Thu May 12 20:26:07 2005 UTC
# Line 224  public class Demo Line 224  public class Demo
224                      mkTree(),                      mkTree(),
225                      examples);                      examples);
226    
227        new PopUpAction("Table",
228                        mkTable(),
229                        examples);
230    
231      help.add(new JMenuItem("just play with the widgets"));      help.add(new JMenuItem("just play with the widgets"));
232      help.add(new JMenuItem("and enjoy the sensation of"));      help.add(new JMenuItem("and enjoy the sensation of"));
233      help.add(new JMenuItem("your neural connections growing"));      help.add(new JMenuItem("your neural connections growing"));
# Line 835  public class Demo Line 839  public class Demo
839      JTree tree = new JTree(root);      JTree tree = new JTree(root);
840      return tree;      return tree;
841    }    }
842    
843      private static JTable mkTable()
844      {
845        Object[][] tableData = new Object[][] {
846          {
847            "Field 1", "Field 2" , "Field 3"
848          },
849          {
850            "Field 4", "Field 5" , "Field 6"
851          },
852          {
853            "Field 7", "Field 8" , "Field 9"
854          },
855          {
856            "Field 10", "Field 11" , "Field 12"
857          }
858        };
859        Object[] columnNames = new Object[] {"Column 1", "Column 2", "Column 3"};
860    
861        JTable table = new JTable(tableData, columnNames);
862        return table;
863      }
864        
865    private JPanel mkButtonBar()    private JPanel mkButtonBar()
866    {        {    
# Line 921  public class Demo Line 947  public class Demo
947                      mkTree(),                      mkTree(),
948                      panel);                      panel);
949            
950        new PopUpAction("Table",
951                        mkTable(),
952                        panel);
953        
954      JButton exitDisposer = mkDisposerButton(frame);      JButton exitDisposer = mkDisposerButton(frame);
955      panel.add(exitDisposer);      panel.add(exitDisposer);
956    

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26