package gui;

import java.awt.Dimension;
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;

import javax.swing.JCheckBoxMenuItem;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.UIManager;

public class Main extends JFrame implements ComponentListener{

	private static final long serialVersionUID = 1L;

	FractalPanel fp = new FractalPanel();

	// Declare menu bar items

	JMenuBar menubar = new JMenuBar();
	JMenu file = new JMenu("File");
	JMenuItem file_exit = new JMenuItem("Exit");
	JMenu view = new JMenu("View");
	JCheckBoxMenuItem view_grid = new JCheckBoxMenuItem("Zoom");
	JMenu help = new JMenu("Help");
	JMenuItem help_about = new JMenuItem("About Fractal Visualizer");
	
	public Main(){
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setTitle("Fractal Visualizer");
		setMinimumSize(new Dimension(200,200));
		
		fp.addComponentListener(this);
		add(fp);
		pack();
		setResizable(false);
		setLocationRelativeTo(null);
		setVisible(true);
	}
	
	public static void main(String[] args) {
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (Exception e) {
		}
		
		new Main();
	}

	public void componentHidden(ComponentEvent e) {
		
	}

	public void componentMoved(ComponentEvent e) {
		
	}

	public void componentResized(ComponentEvent e) {
		fp.renderImage();
	}

	public void componentShown(ComponentEvent e) {
		
	}

}

@@ -654,12 +654,12 @@
 iew_
-grid
+zoom
  = n
@@ -684,24 +684,93 @@
 em(%22Zoom%22);%0A
+%09JCheckBoxMenuItem view_full = new JCheckBoxMenuItem(%22Full Screen%22);%0A
 %09JMenu help 
@@ -952,16 +952,16 @@
 izer%22);%0A
-
 %09%09setMin
@@ -997,16 +997,199 @@
 0));%0A%09%09%0A
+%09%09file.add(file_exit);%0A%09%09view.add(view_zoom);%0A%09%09view.add(view_full);%0A%09%09help.add(help_about);%0A%09%09menubar.add(file);%0A%09%09menubar.add(view);%0A%09%09menubar.add(help);%0A%09%09setJMenuBar(menubar);%0A%09%09%0A
 %09%09fp.add

Add menu bar.