public void paint(Graphics g) {
        int frameHeight = getSize().height;
        int frameWidth = getSize().width;
        
        Graphics2D g2d = (Graphics2D) g;
        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                RenderingHints.VALUE_ANTIALIAS_ON);
        g2d.clearRect(0, 0, frameWidth, frameHeight);
        switch (type) {
        case FkSolution:
            drawSolution1(g2d);
            break;
        case F2kSolution:
            drawSolution2(g2d, frameWidth, frameHeight);
            break;
        case F3kSolution:
            drawSolution3(g2d, frameWidth, frameHeight);
            break;
        case F4kSolution:
            drawSolution4(g2d, frameWidth, frameHeight);
            break;
        default:
            System.err
                    .println("unknown SolutionType\tpart2.AbstractSolution.paint()");
        }
    }