@Override
        public void paintComponent(Graphics g){
            super.paintComponent(g);
            Graphics2D g2d = (Graphics2D)g;

            /* added by Adam
            * this draws a background image if there is one...
            */
            if(background != null && !isGlass){
                g2d.drawImage(background,0,0,null);
            }

            g2d.setBackground(Color.WHITE);
            for (ShapeWrapper s : shapes) {
                g2d.setStroke(new BasicStroke(s.getLineSize(), BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));

                if (s.isImg()) { // added by Jeremy; draws image to pane
                    g2d.drawImage(s.getImg(), 0, 0, null);
                } else if (s.isErase()) {
                    g2d.setColor(Color.WHITE);
                    g2d.draw(s.getShape());

                }else if(s.isText() && s.getString() != null) {
                    //fixing the text tool...
                    font = getFont().deriveFont((float)s.getLineSize() * 3);
                    glyphVector = font.createGlyphVector(getFontMetrics(font).getFontRenderContext(), s.getString());
                    Shape textShape = glyphVector.getOutline((float)s.getShape().getBounds().getX(),(float)s.getShape().getBounds().getY());
                    g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                    g2d.setColor(s.getColor());
                    g2d.fill(textShape);
                }else if(s.isMagic()) {
                    
                	g2d.setStroke(new WobbleStroke(s.getLineSize()/2f, s.getLineSize()/2f));
                    g2d.setColor(s.getColor());
                    g2d.draw(s.getShape());
                }else {
                    g2d.setColor(s.getColor());
                    g2d.draw(s.getShape());
                }
            }//end for:shapes

        }//end paintComponent