I found the problem. I had to initialize Widgets each time. So each time I wanted to use one i had to use
widgetName[number] = new widget();
Thanks for all your help!
Type: Posts; User: oscardog
I found the problem. I had to initialize Widgets each time. So each time I wanted to use one i had to use
widgetName[number] = new widget();
Thanks for all your help!
Oh Right! Sorry, misunderstood.
Yes the first code, with the fix, worked fine. But then i changed it so they all used the same sort of system and it returned to the null point exceptions :(
...
No? Because the fix I applied, adding the "new JComboBox[10];" is on the second code yet it still throws the error?
Or did I miss a fix because i'm sure that was the fix...
Oscardog
Added new code... throws
Duno why :-s
package graphicalui;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
Thanks - it now works.
Is the 4 in the [] how many combo boxes im going to declare?
Edit: Answered my own question, cheers!
Oscardog
So i'm doing this thing for one of my classes and it's so close to working except it throws the following exception:
And here is my code:
package graphicalui;
import javax.swing.*;