Page 1 of 2 12 LastLast
Results 1 to 20 of 24
  1. #1
    jamcswain's Avatar
    jamcswain is offline Member
    Join Date
    Mar 2012
    Location
    Oklahoma
    Posts
    14
    Rep Power
    0

    Exclamation HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    I'm trying to compile a Mandelbrot Set Explorer that I created on my own and have run into a problem: when I run the code in the attachment I get many runtime exceptions, and I don't know how to fix them:

    Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problem:
    Syntax error on token(s), misplaced construct(s)

    at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComp onent(MandelbrotExplorer.java:132)
    at javax.swing.JComponent.paint(JComponent.java:1029)
    at javax.swing.JComponent.paintToOffscreen(JComponent .java:5138)
    at javax.swing.BufferStrategyPaintManager.paint(Buffe rStrategyPaintManager.java:302)
    at javax.swing.RepaintManager.paint(RepaintManager.ja va:1188)
    at javax.swing.JComponent._paintImmediately(JComponen t.java:5086)
    at javax.swing.JComponent.paintImmediately(JComponent .java:4896)
    at javax.swing.RepaintManager.paintDirtyRegions(Repai ntManager.java:783)
    at javax.swing.RepaintManager.paintDirtyRegions(Repai ntManager.java:735)
    at javax.swing.RepaintManager.prePaintDirtyRegions(Re paintManager.java:677)
    at javax.swing.RepaintManager.access$700(RepaintManag er.java:58)
    at javax.swing.RepaintManager$ProcessingRunnable.run( RepaintManager.java:1593)
    at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:226)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.j ava:647)
    at java.awt.EventQueue.access$000(EventQueue.java:96)
    at java.awt.EventQueue$1.run(EventQueue.java:608)
    at java.awt.EventQueue$1.run(EventQueue.java:606)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:105)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java: 617)
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:200)
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:185)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:177)
    at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:138)
    Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problem:
    Syntax error on token(s), misplaced construct(s)

    at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComp onent(MandelbrotExplorer.java:132)
    at javax.swing.JComponent.paint(JComponent.java:1029)
    at javax.swing.JComponent.paintChildren(JComponent.ja va:866)
    at javax.swing.JComponent.paint(JComponent.java:1038)
    at javax.swing.JComponent.paintChildren(JComponent.ja va:866)
    at javax.swing.JComponent.paint(JComponent.java:1038)
    at javax.swing.JLayeredPane.paint(JLayeredPane.java:5 81)
    at javax.swing.JComponent.paintChildren(JComponent.ja va:866)
    at javax.swing.JComponent.paintToOffscreen(JComponent .java:5145)
    at javax.swing.BufferStrategyPaintManager.paint(Buffe rStrategyPaintManager.java:302)
    at javax.swing.RepaintManager.paint(RepaintManager.ja va:1188)
    at javax.swing.JComponent.paint(JComponent.java:1015)
    at java.awt.GraphicsCallback$PaintCallback.run(Graphi csCallback.java:39)
    at sun.awt.SunGraphicsCallback.runOneComponent(SunGra phicsCallback.java:78)
    at sun.awt.SunGraphicsCallback.runComponents(SunGraph icsCallback.java:115)
    at java.awt.Container.paint(Container.java:1784)
    at javax.swing.RepaintManager.paintDirtyRegions(Repai ntManager.java:794)
    at javax.swing.RepaintManager.paintDirtyRegions(Repai ntManager.java:735)
    at javax.swing.RepaintManager.prePaintDirtyRegions(Re paintManager.java:677)
    at javax.swing.RepaintManager.access$700(RepaintManag er.java:58)
    at javax.swing.RepaintManager$ProcessingRunnable.run( RepaintManager.java:1593)
    at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:226)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.j ava:647)
    at java.awt.EventQueue.access$000(EventQueue.java:96)
    at java.awt.EventQueue$1.run(EventQueue.java:608)
    at java.awt.EventQueue$1.run(EventQueue.java:606)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:105)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java: 617)
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:200)
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:185)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:177)
    at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:138)
    Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problem:
    Syntax error on token(s), misplaced construct(s)

    at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComp onent(MandelbrotExplorer.java:132)
    at javax.swing.JComponent.paint(JComponent.java:1029)
    at javax.swing.JComponent.paintToOffscreen(JComponent .java:5138)
    at javax.swing.BufferStrategyPaintManager.paint(Buffe rStrategyPaintManager.java:302)
    at javax.swing.RepaintManager.paint(RepaintManager.ja va:1188)
    at javax.swing.JComponent._paintImmediately(JComponen t.java:5086)
    at javax.swing.JComponent.paintImmediately(JComponent .java:4896)
    at javax.swing.RepaintManager.paintDirtyRegions(Repai ntManager.java:783)
    at javax.swing.RepaintManager.paintDirtyRegions(Repai ntManager.java:735)
    at javax.swing.RepaintManager.prePaintDirtyRegions(Re paintManager.java:677)
    at javax.swing.RepaintManager.access$700(RepaintManag er.java:58)
    at javax.swing.RepaintManager$ProcessingRunnable.run( RepaintManager.java:1593)
    at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:226)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.j ava:647)
    at java.awt.EventQueue.access$000(EventQueue.java:96)
    at java.awt.EventQueue$1.run(EventQueue.java:608)
    at java.awt.EventQueue$1.run(EventQueue.java:606)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:105)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java: 617)
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:200)
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:185)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:177)
    at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:138)


    Here is my class:
    Java Code:
    package com.jam.ME;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    
    public class MandelbrotExplorer {
    	private int x;
    	private int y;
    	private int[][] palette;
    	public static final int MAX_ITERATIONS = 1024;
    	public static final int ESCAPE = 1025;
    	private float iMax = 1.5f;
    	private float iMin = -1.5f;
    	private float rMin = -2.5f;
    	private float rMax = 1.5f;
    	private float xScale;
    	private float yScale;
    	private float zx, zy;
    	private float cx, cy;
    	private float tempZx;
    	private int count;
    	private JFrame window;
    	private JDrawPanel panel;
    	
    	private int wrap(int x) {
    		x = ((x + 256) & 0x1ff) - 256;
    		if(x < 0) {
    			x = -x;
    		}
    		return x;
    	}
    	
    	private void makePalette() {
    		for(int i = 0; i >= MandelbrotExplorer.MAX_ITERATIONS; i++) {
    			this.palette[i][1] = wrap(7*i);
    			this.palette[i][2] = wrap(5*i);
    			this.palette[i][3] = wrap(11*i);
    		}
    	}
    	
    	private class MyMouseListener implements MouseListener {
    		public void mouseClicked(MouseEvent e) {
    			float width = rMax - rMin;
    			float height = iMin - iMax;
    			float clickR = rMin + width * (e.getX()) / (panel.getWidth());
    			float clickI = iMax + height * (e.getY()) / (panel.getHeight());
    			
    			int zoom = 8;
    			
    			rMin = clickR - width / zoom;
    			rMax = clickR + width / zoom;
    			iMax = clickI - height / zoom;
    			iMin = clickI + height / zoom;
    			
    			if(e.getButton() == MouseEvent.BUTTON3) {
    				rMin = -2.5f;
    				rMax = 1.5f;
    				iMax = 1.5f;
    				iMin = -1.5f;
    			}
    			panel.repaint();
    		}
    		
    		public void mouseEntered(MouseEvent e) { }
    		public void mouseExited(MouseEvent e) { }
    		public void mousePressed(MouseEvent e) { }
    		public void mouseReleased(MouseEvent e) { }
    	}
    	
    	private class MyComponentListener implements ComponentListener {
    		public void componentResized(ComponentEvent e) {
    			float width = ((iMin - iMax) * panel.getWidth() / panel.getHeight());
    			float height = ((rMax - rMin) * panel.getWidth() / panel.getHeight());
    			float iMid = (iMax + iMin) / 2;
    			float rMid = (rMax + rMin) / 2;
    			rMin = rMid - width /2;
    			rMax = rMid + width /2;
    			iMin = iMid - height /2;
    			iMax = iMid + height /2;
    			panel.repaint();
    		}
    		public void componentHidden(ComponentEvent e) { }
    		public void componentMoved(ComponentEvent e) { }
    		public void componentShown(ComponentEvent e) { }
    	}
    	
    	public static void main(String[] args) {
    		MandelbrotExplorer me = new MandelbrotExplorer();
    		me.go();
    	}
    	
    	public void go() {
    		window = new JFrame("Mandelbrot Set Explorer");
    		window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    		panel = new JDrawPanel();
    		panel.addMouseListener(new MyMouseListener());
    		window.addComponentListener(new MyComponentListener());
    		window.getContentPane().add(panel, BorderLayout.CENTER);
    		xScale = rMax / (float) panel.getWidth();
    		yScale = iMax / (float) panel.getHeight();
    		window.setSize(700, 768);
    		makePalette();
    		window.setVisible(true);
    	}
    	
    	@SuppressWarnings("serial")
    	private class JDrawPanel extends JPanel {
    		public void paintComponent(Graphics g) {
    			for(y = 1; y <= panel.getHeight(); y++) {
    				for(x = 1; x <= panel.getWidth(); x++) {
    					cx = x * xScale + rMin;
    					cy = y * yScale + iMin;
    					zx = zy = count = 0;
    					int esc = MandelbrotExplorer.ESCAPE;
    					
    					while((zx * zx + zy*zy < esc) && count < MandelbrotExplorer.MAX_ITERATIONS) {
    						tempZx = zx * zx - zy * zy + cx;
    						zy = 2 * zx * zy + cy;
    						zx = tempZx;
    						count++;
    					}
    					if(count == MandelbrotExplorer.MAX_ITERATIONS) {
    						count = -1;
    					}
    					if(count < 0) {
    						g.setColor(new Color(0, 0, 0));
    					}
    					else {
    						int[] color = palette[count];
    						g.setColor(new Color(color[1], color[2], color[3]));
    					}
    					g.fillRect(x, y, 1, 1);
    				}
    			}
    		}
    	}
    }
    Please help and thank you in advance!
    Last edited by jamcswain; 03-23-2012 at 12:50 AM.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    Quote Originally Posted by jamcswain View Post
    I'm trying to compile a Mandelbrot Set Explorer that I created on my own and have run into a problem: when I run the code in the attachment I get many runtime exceptions, and I don't know how to fix them:
    Java Code:
    Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problem: 
    	Syntax error on token(s), misplaced construct(s)
    You're trying to run non-compilable code -- don't do this! Fix the compilation problems first before trying to run this!

  3. #3
    jamcswain's Avatar
    jamcswain is offline Member
    Join Date
    Mar 2012
    Location
    Oklahoma
    Posts
    14
    Rep Power
    0

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    How is it possible to run non-compilable code when it won't let you compile it if it has errors?

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,401
    Rep Power
    25

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    it won't let you compile it if it has errors
    The compile step is done before execution. The compiler is what finds syntax errors. They must be corrected before you can execute the program.
    If you don't understand my response, don't ignore it, ask a question.

  5. #5
    jamcswain's Avatar
    jamcswain is offline Member
    Join Date
    Mar 2012
    Location
    Oklahoma
    Posts
    14
    Rep Power
    0

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    Ok, well I understand that, but how do I fix it? I can't make sense of the errors.

  6. #6
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,401
    Rep Power
    25

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    Use a compiler like javac that will give error messages.
    If you don't understand my response, don't ignore it, ask a question.

  7. #7
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    Yep, you need to get the error messages from the compiler.

  8. #8
    jamcswain's Avatar
    jamcswain is offline Member
    Join Date
    Mar 2012
    Location
    Oklahoma
    Posts
    14
    Rep Power
    0

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    I just used javac, and it compiled just fine, then I ran it with Java and it blew up again...
    Here's the shell session:
    Java Code:
    jacob@ThinkPad-X41-Kubuntu:~/workspace/MandelbrotExplorer/src$ javac -d ../bin com/jam/ME/MandelbrotExplorer.java
    jacob@ThinkPad-X41-Kubuntu:~/workspace/MandelbrotExplorer/src$ ls
    com
    jacob@ThinkPad-X41-Kubuntu:~/workspace/MandelbrotExplorer/src$ cd ..
    jacob@ThinkPad-X41-Kubuntu:~/workspace/MandelbrotExplorer$ ls
    bin  src
    jacob@ThinkPad-X41-Kubuntu:~/workspace/MandelbrotExplorer$ cd bin
    jacob@ThinkPad-X41-Kubuntu:~/workspace/MandelbrotExplorer/bin$ ls
    com
    jacob@ThinkPad-X41-Kubuntu:~/workspace/MandelbrotExplorer/bin$ java com.jam.ME.MandelbrotExplorer
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComponent(MandelbrotExplorer.java:129)
            at javax.swing.JComponent.paint(JComponent.java:1054)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
            at javax.swing.JComponent.paint(JComponent.java:1040)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
            at java.awt.Container.paint(Container.java:1967)
            at java.awt.Window.paint(Window.java:3867)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
            at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
            at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
            at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComponent(MandelbrotExplorer.java:129)
            at javax.swing.JComponent.paint(JComponent.java:1054)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
            at javax.swing.JComponent.paint(JComponent.java:1040)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
            at java.awt.Container.paint(Container.java:1967)
            at java.awt.Window.paint(Window.java:3867)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
            at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
            at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
            at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComponent(MandelbrotExplorer.java:129)
            at javax.swing.JComponent.paint(JComponent.java:1054)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
            at javax.swing.JComponent.paint(JComponent.java:1040)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
            at java.awt.Container.paint(Container.java:1967)
            at java.awt.Window.paint(Window.java:3867)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
            at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
            at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
            at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComponent(MandelbrotExplorer.java:129)
            at javax.swing.JComponent.paint(JComponent.java:1054)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
            at javax.swing.JComponent.paint(JComponent.java:1040)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
            at java.awt.Container.paint(Container.java:1967)
            at java.awt.Window.paint(Window.java:3867)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
            at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
            at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
            at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComponent(MandelbrotExplorer.java:129)
            at javax.swing.JComponent.paint(JComponent.java:1054)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
            at javax.swing.JComponent.paint(JComponent.java:1040)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
            at java.awt.Container.paint(Container.java:1967)
            at java.awt.Window.paint(Window.java:3867)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
            at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
            at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
            at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComponent(MandelbrotExplorer.java:129)
            at javax.swing.JComponent.paint(JComponent.java:1054)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
            at javax.swing.JComponent.paint(JComponent.java:1040)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
            at java.awt.Container.paint(Container.java:1967)
            at java.awt.Window.paint(Window.java:3867)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
            at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
            at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
            at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComponent(MandelbrotExplorer.java:129)
            at javax.swing.JComponent.paint(JComponent.java:1054)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
            at javax.swing.JComponent.paint(JComponent.java:1040)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
            at java.awt.Container.paint(Container.java:1967)
            at java.awt.Window.paint(Window.java:3867)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
            at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
            at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
            at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComponent(MandelbrotExplorer.java:129)
            at javax.swing.JComponent.paint(JComponent.java:1054)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
            at javax.swing.JComponent.paint(JComponent.java:1040)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
            at java.awt.Container.paint(Container.java:1967)
            at java.awt.Window.paint(Window.java:3867)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
            at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
            at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
            at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComponent(MandelbrotExplorer.java:129)
            at javax.swing.JComponent.paint(JComponent.java:1054)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
            at javax.swing.JComponent.paint(JComponent.java:1040)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
            at java.awt.Container.paint(Container.java:1967)
            at java.awt.Window.paint(Window.java:3867)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
            at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
            at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
            at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComponent(MandelbrotExplorer.java:129)
            at javax.swing.JComponent.paint(JComponent.java:1054)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
            at javax.swing.JComponent.paint(JComponent.java:1040)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
            at java.awt.Container.paint(Container.java:1967)
            at java.awt.Window.paint(Window.java:3867)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
            at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
            at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
            at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComponent(MandelbrotExplorer.java:129)
            at javax.swing.JComponent.paint(JComponent.java:1054)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
            at javax.swing.JComponent.paint(JComponent.java:1040)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
            at java.awt.Container.paint(Container.java:1967)
            at java.awt.Window.paint(Window.java:3867)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
            at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
            at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
            at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComponent(MandelbrotExplorer.java:129)
            at javax.swing.JComponent.paint(JComponent.java:1054)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
            at javax.swing.JComponent.paint(JComponent.java:1040)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
            at java.awt.Container.paint(Container.java:1967)
            at java.awt.Window.paint(Window.java:3867)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
            at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
            at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
            at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at com.jam.ME.MandelbrotExplorer$JDrawPanel.paintComponent(MandelbrotExplorer.java:129)
            at javax.swing.JComponent.paint(JComponent.java:1054)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paint(JComponent.java:1063)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:585)
            at javax.swing.JComponent.paintChildren(JComponent.java:887)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5228)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
            at javax.swing.JComponent.paint(JComponent.java:1040)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
            at java.awt.Container.paint(Container.java:1967)
            at java.awt.Window.paint(Window.java:3867)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
            at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
            at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
            at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

  9. #9
    jamcswain's Avatar
    jamcswain is offline Member
    Join Date
    Mar 2012
    Location
    Oklahoma
    Posts
    14
    Rep Power
    0

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    Should I find out what a NullPointerException is?

  10. #10
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,520
    Blog Entries
    7
    Rep Power
    20

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    Quote Originally Posted by jamcswain View Post
    Should I find out what a NullPointerException is?
    A NPE is easy to spot and trace back: a reference happens to be null and you're trying to dereference it, e.g.

    Java Code:
    String s= null; // a null reference
    int len= s.length(); // null cannot be dereferenced: NPE
    The exception stack trace prints out the line number where the exception was thrown; just before that line print out everything that can be null. If something is null, go back in your code and print the value of those possibly null values out again.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  11. #11
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,520
    Blog Entries
    7
    Rep Power
    20

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    @OP: you have a typo in your avatar: keyborad

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  12. #12
    jamcswain's Avatar
    jamcswain is offline Member
    Join Date
    Mar 2012
    Location
    Oklahoma
    Posts
    14
    Rep Power
    0

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    Lol, I didn't see the typo. And I'll keep the NPE in mind as i check my code again. Thanks

  13. #13
    jamcswain's Avatar
    jamcswain is offline Member
    Join Date
    Mar 2012
    Location
    Oklahoma
    Posts
    14
    Rep Power
    0

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    When does a JPanel draw itself? Is it when the JFrame containing it becomes visible? I need to know to see if the palette has already been initialized my the time the NPE is called at line 129:
    Java Code:
    int[] color = palette[count];
    Last edited by jamcswain; 03-23-2012 at 03:17 PM. Reason: Added more info

  14. #14
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,401
    Rep Power
    25

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    Which variable/array element is null? Add a println to print out the values to see which is null.
    A component is redrawn when the java program thinks it needs to be or in response to a call to repaint()
    If you don't understand my response, don't ignore it, ask a question.

  15. #15
    jamcswain's Avatar
    jamcswain is offline Member
    Join Date
    Mar 2012
    Location
    Oklahoma
    Posts
    14
    Rep Power
    0

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    For some reason count always equals 1. hmmm....

  16. #16
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,401
    Rep Power
    25

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    How would it get any other value?
    If you don't understand my response, don't ignore it, ask a question.

  17. #17
    jamcswain's Avatar
    jamcswain is offline Member
    Join Date
    Mar 2012
    Location
    Oklahoma
    Posts
    14
    Rep Power
    0

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    palette[2] is null as well. But I know for a fact that palette has been fully initialized because in the earlier code of that same method, I initialize it with this:
    Java Code:
                for(int i = 1; i >= MandelbrotExplorer.MAX_ITERATIONS; i++) {
                    palette[i][1] = wrap(7*i);
                    palette[i][2] = wrap(5*i);
                    palette[i][3] = wrap(11*i);
                }
    and wrap(int) is this:
    Java Code:
        private int wrap(int x) {
            x = ((x + 256) & 0x1ff) - 256;
            if(x < 0) {
                x = -x;
            }
            return x;
        }

  18. #18
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,401
    Rep Power
    25

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    Is the for loop executing any loops? add a println inside it to see.
    Or printout the first few elements in the array to see if the array has some values.
    If you don't understand my response, don't ignore it, ask a question.

  19. #19
    jamcswain's Avatar
    jamcswain is offline Member
    Join Date
    Mar 2012
    Location
    Oklahoma
    Posts
    14
    Rep Power
    0

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    I tried to print out the whole returned value of palette[count] and it caused another NPE. oh wait, i had an idea, get back to u in a sec

  20. #20
    jamcswain's Avatar
    jamcswain is offline Member
    Join Date
    Mar 2012
    Location
    Oklahoma
    Posts
    14
    Rep Power
    0

    Default Re: HELP! Mandelbrot Set Explorer, many GUI runtime exceptions, need HELP plz!

    Never mind... It didn't work...

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 09-12-2011, 10:42 AM
  2. Runtime/Compile Time Exceptions
    By suresh.sa in forum New To Java
    Replies: 1
    Last Post: 10-18-2010, 11:32 AM
  3. In honor of Benoît Mandelbrot. May he rest in peace.
    By Fubarable in forum Forum Lobby
    Replies: 0
    Last Post: 10-17-2010, 09:31 PM
  4. How to draw Mandelbrot in Java
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-23-2008, 11:21 PM
  5. Runtime Exceptions
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-12-2007, 10:31 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •