Use ScrollablePanel to achieve sensible scrolling behavior in the playlist

and browser.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@611 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2002-02-28 16:32:45 +00:00
parent 48df5d2710
commit 62932acc45
2 changed files with 7 additions and 4 deletions
@@ -1,12 +1,14 @@
//
// $Id: EntryList.java,v 1.10 2002/02/22 07:06:33 mdb Exp $
// $Id: EntryList.java,v 1.11 2002/02/28 16:32:45 mdb Exp $
package robodj.chooser;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.*;
import javax.swing.*;
import javax.swing.event.*;
@@ -29,7 +31,8 @@ public abstract class EntryList extends JPanel
// create the pane that will hold the buttons
gl = new VGroupLayout(GroupLayout.NONE);
gl.setJustification(GroupLayout.TOP);
_bpanel = new JPanel(gl);
_bpanel = new ScrollablePanel();
_bpanel.setLayout(gl);
// give ourselves a wee bit of a border
_bpanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
@@ -1,5 +1,5 @@
//
// $Id: PlaylistPanel.java,v 1.10 2002/02/22 08:37:17 mdb Exp $
// $Id: PlaylistPanel.java,v 1.11 2002/02/28 16:32:45 mdb Exp $
package robodj.chooser;
@@ -374,7 +374,7 @@ public class PlaylistPanel
* A panel that can be made to scroll a particular child into view
* when it becomes visible.
*/
protected static class SmartPanel extends JPanel
protected static class SmartPanel extends ScrollablePanel
{
public void setScrollTarget (JComponent comp)
{