public void mouseDragged(MouseEvent e) {
            //this item panel is the head item so just return
            //we can't move the head item
            if (getItemPanel().previousItem == null) {
                return;
            }

            Point loc = e.getPoint();
            SwingUtilities.convertPointToScreen(loc, (Component) e.getSource());

            int deltaY = loc.y - startDragY;

            //make sure deltaY isn't too small
            if ((startY + deltaY) < (getItemPanel().previousItem.getY() + HEADER_HEIGHT)) {
                deltaY = (getItemPanel().previousItem.getY() + HEADER_HEIGHT) - startY;
            }

            //make sure deltaY isn't too big
            if (getItemPanel().nextItem == null) {
                if ((startY + deltaY) > StackPanel.this.getHeight() - HEADER_HEIGHT) {
                    deltaY = (StackPanel.this.getHeight() - HEADER_HEIGHT) - startY;
                }
            } else if ((startY + deltaY) > (getItemPanel().nextItem.getY() - HEADER_HEIGHT)) {
                deltaY = (getItemPanel().nextItem.getY() - HEADER_HEIGHT) - startY;
            }

            int x = getItemPanel().getX();
            int y = startY + deltaY;

            int w = getItemPanel().getWidth();
            int h = startH - deltaY;

            //adjust this panel
            getItemPanel().setBounds(x, y, w, h);

            //adjust previous panel
            if (getItemPanel().previousItem != null) {
                x = getItemPanel().previousItem.getX();
                y = prevStartY - deltaY;
                w = getItemPanel().previousItem.getWidth();
                h = prevStartH + deltaY;

                getItemPanel().previousItem.setBounds(x, y, w, h);
            }

            //StackedPanel2.this.getLayout().layoutContainer(StackedPanel2.this);

            StackPanel.this.revalidate();
            //StackedPanel2.this.invalidate();
            StackPanel.this.repaint();

            //if bottom component
            if(getItemPanel().nextItem == null) {
                if((getItemPanel().getY() + HEADER_HEIGHT) == StackPanel.this.getHeight()) {
                    getItemPanel().fireCollapsedEvent();
                }
            }
            else {
                if((getItemPanel().getY() + HEADER_HEIGHT) == getItemPanel().nextItem.getY()) {
                    getItemPanel().fireCollapsedEvent();
                }
            }


        }