public Fractal() {
        
        super("Fractal");
        
        controlJPanel = new JPanel();
        controlJPanel.setLayout(new FlowLayout());
        
        changeColorJButton = new JButton("Color");
        controlJPanel.add(changeColorJButton);
        
        
        changeColorJButton.addActionListener(
                new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {
                Color color = JColorChooser.showDialog(Fractal.this, "Choose a color", Color.BLUE);
                
                if(color == null) {
                    color = Color.BLUE;
                }
                
                drawSpace.setColor(color);
            
            }
        });
        
        
        decreaseLevelJButton = new JButton("Decrease Level");
        controlJPanel.add(decreaseLevelJButton);
        decreaseLevelJButton.addActionListener(
                new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {

                int level = drawSpace.getLevel();
                --level;
                
                if((level >= MIN_LEVEL) && (level <= MAX_LEVEL)) {
                    levelJLabel.setText("Level : "+level);
                    drawSpace.setLevel(level);
                    repaint();
                }
            }
        });
        
        
        
        increaseLevelJButton = new JButton("Increase Level");
        controlJPanel.add(increaseLevelJButton);
        increaseLevelJButton.addActionListener(
                new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {

                int level = drawSpace.getLevel();
                ++level;
                
                if((level >= MIN_LEVEL) && (level <= MAX_LEVEL)) {
                    levelJLabel.setText("Level : "+level);
                    drawSpace.setLevel(level);
                    repaint();
                }
            }
        });
        
        
        levelJLabel = new JLabel("Level: 0");
        controlJPanel.add(levelJLabel);
        
        drawSpace = new FractalJpanel(0);
        
        mainJPanel = new JPanel();
        mainJPanel.add(controlJPanel);
        mainJPanel.add(drawSpace);
        
        add(mainJPanel);
        
        
        setSize(WIDTH, HEIGHT);
        setVisible(true);
        setResizable(false);
        setLocationRelativeTo(null);
        
    }