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

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

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

revision 1.2 by rabbit78, Tue Oct 25 15:13:56 2005 UTC revision 1.3 by trebligd, Sat Oct 29 05:04:23 2005 UTC
# Line 48  public class ScrollBarDemo Line 48  public class ScrollBarDemo
48    public ScrollBarDemo(String title)    public ScrollBarDemo(String title)
49    {    {
50      super(title);      super(title);
51      getContentPane().add(createContent());      JPanel content = createContent();
52        JPanel closePanel = new JPanel();
53        JButton closeButton = new JButton("Close");
54        closeButton.setActionCommand("CLOSE");
55        closeButton.addActionListener(this);
56        closePanel.add(closeButton);
57        content.add(closePanel, BorderLayout.SOUTH);
58        getContentPane().add(content);
59    }    }
60                
61      /**
62       * Returns a panel with the demo content.  The panel
63       * uses a BorderLayout(), and the BorderLayout.SOUTH area
64       * is empty, to allow callers to add controls to the
65       * bottom of the panel if they want to (a close button is
66       * added if this demo is being run as a standalone demo).
67       */      
68    JPanel createContent()    JPanel createContent()
69    {    {
70      JPanel content = new JPanel(new BorderLayout());      JPanel content = new JPanel(new BorderLayout());
71      JPanel panel = createScrollBarPanel();      JPanel panel = createScrollBarPanel();
72      content.add(panel);      content.add(panel);
     JPanel closePanel = new JPanel();  
     JButton closeButton = new JButton("Close");  
     closeButton.setActionCommand("CLOSE");  
     closeButton.addActionListener(this);  
     closePanel.add(closeButton);  
     content.add(closePanel, BorderLayout.SOUTH);  
73      return content;              return content;        
74    }    }
75            

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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