We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › NullPointerException in PApplet size method
Page Index Toggle Pages: 1
NullPointerException in PApplet size method (Read 497 times)
NullPointerException in PApplet size method
Jul 6th, 2006, 3:28pm
 
Hi,
I have developed an applet that runs in a browser.
When I open the html page using an web server like Tomcat, opening any number of instances of the page works fine.
But when I open the same html page directly(not using the URL) twice, I get a null pointer exception as :

java.lang.NullPointerException
at processing.core.PApplet.size(PApplet.java:848)
at com.persistent.chart.ui.BarGraph2D.calculateGraphParameters(BarGraph2D.java:113)

at com.persistent.chart.ui.BarGraph2D.refreshChart(BarGraph2D.java:1085)
at com.bms.ui.chartpanels.ChartPanel.setChartData(ChartPanel.java:43)
at com.bms.ui.AppletFramework.updateChartData(AppletFramework.java:166)
at com.bms.ui.AppletFramework.valueChanged(AppletFramework.java:207)
at javax.swing.JTree.fireValueChanged(Unknown Source)
at javax.swing.JTree$TreeSelectionRedirector.valueChanged(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown Source)
at javax.swing.JTree.setSelectionPaths(Unknown Source)
at javax.swing.JTree.setSelectionRows(Unknown Source)
at javax.swing.JTree.setSelectionRow(Unknown Source)
at com.bms.ui.AppletFramework.buildUI(AppletFramework.java:101)
at com.bms.ui.AppletFramework.initialize(AppletFramework.java:59)
at com.bms.ui.AppletFramework.init(AppletFramework.java:44)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Has anyone else faced a similar problem?
Any pointers would be helpful.
Re: NullPointerException in PApplet size method
Reply #1 - Jul 20th, 2006, 2:33pm
 
could you post your code please?
Page Index Toggle Pages: 1