Search:

Type: Posts; User: oscardog

Search: Search took 0.19 seconds.

  1. [SOLVED] Re: Exception in thread "main" java.lang.NullPointerException

    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!
  2. [SOLVED] Re: Exception in thread "main" java.lang.NullPointerException

    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 :(
    ...
  3. [SOLVED] Re: Exception in thread "main" java.lang.NullPointerException

    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
  4. [SOLVED] Re: Exception in thread "main" java.lang.NullPointerException

    Added new code... throws

    Duno why :-s


    package graphicalui;

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
  5. [SOLVED] Re: Exception in thread "main" java.lang.NullPointerException

    Thanks - it now works.

    Is the 4 in the [] how many combo boxes im going to declare?

    Edit: Answered my own question, cheers!

    Oscardog
  6. [SOLVED] Exception in thread "main" java.lang.NullPointerException while implementing JFrame

    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.*;
Results 1 to 6 of 6