Nice one for solving that oscardog! I still didn't have a solution for you ~X(|-)
Type: Posts; User: JavaPF
Nice one for solving that oscardog! I still didn't have a solution for you ~X(|-)
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]);
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 {
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..
Yes oscardog, the 4 is how many values it can hold...
Good work leandro, I was just posting the same thing. :)>-
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...