Search:

Type: Posts; User: JavaPF

Search: Search took 0.10 seconds.

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

    Nice one for solving that oscardog! I still didn't have a solution for you ~X(|-)
  2. [SOLVED] Re: Exception in thread "main" java.lang.NullPointerException

    Hello oscardog,

    The problem is with all of these im afraid:



    //Creating the combo boxes...
    foodList[0].setBounds(10,50,150, 30);
    panel.add(foodList[0]);
  3. [SOLVED] Re: Exception in thread "main" java.lang.NullPointerException

    I'm talking about this original code which seems to differ from the one above.



    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;

    public class graphicalUI extends JFrame {
  4. [SOLVED] Re: Exception in thread "main" java.lang.NullPointerException

    Hey oscardog.

    This is a new error with your updated code. When adding the fix to the code you posted originally it all seems to work fine..
  5. [SOLVED] Re: Exception in thread "main" java.lang.NullPointerException

    Yes oscardog, the 4 is how many values it can hold...
  6. [SOLVED] Re: Exception in thread "main" java.lang.NullPointerException

    Good work leandro, I was just posting the same thing. :)>-
  7. [SOLVED] Re: Exception in thread "main" java.lang.NullPointerException

    Hello oscardog and welcome to the Java Programming Forums :)

    The NullPointerException is pointing here:

    foodList[i] = new JComboBox(foodItems);

    It looks like a problem with your foodList...
Results 1 to 7 of 7