Sorry bout the double post but the last post i made had too much code in there. Here's a simplified one. I dunno why but I can't get the combobox to work properly. The following code DOES NOT WORK.. the pull down list doesn't even come down.
----------------------------
import java.awt.event.*;
public class Testing extends Applet
{ private JComboBox comboBox;
public void init()
{ String[] a = {"S","T","G"};
comboBox = new JComboBox(a);
//setLayout(new GridBagLayout());
setLayout(new BorderLayout());
add(comboBox, BorderLayout.NORTH);
}
}
---------------------
However.. if i changed:
add(comboBox, BorderLayout.NORTH);
To this:
add(comboBox, BorderLayout);
The list will start showing up. It seems that the JComboBox doesn't want to work if i use a gridbaglayout or gridlayout either. Could anyone shed some light into my problem? Thanks.
T
----------------------------
import java.awt.event.*;
public class Testing extends Applet
{ private JComboBox comboBox;
public void init()
{ String[] a = {"S","T","G"};
comboBox = new JComboBox(a);
//setLayout(new GridBagLayout());
setLayout(new BorderLayout());
add(comboBox, BorderLayout.NORTH);
}
}
---------------------
However.. if i changed:
add(comboBox, BorderLayout.NORTH);
To this:
add(comboBox, BorderLayout);
The list will start showing up. It seems that the JComboBox doesn't want to work if i use a gridbaglayout or gridlayout either. Could anyone shed some light into my problem? Thanks.
T