Build 020122_1, Win 2000, JDK 1.3.1
javax.jms.Queue displayed without letter 'j' in the Type drop list of the 'Add Resource Environment Reference' dialog.
****
Real problem here is that an editable JComboBox is not
sized correctly. The longest string is not entirely
displayed.
Here is a test app that exhibits the problem:
/* ComboTest.java */
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ComboTest extends JPanel {
static public final String[] RES_TYPES = {
"a really really long entry",
"javax.jms.Queue", // NOI18N
"javax.jms.Topic" // NOI18N
};
public ComboTest () {
setLayout (new BoxLayout (this, BoxLayout.Y_AXIS));
JPanel cbpanel = new JPanel ();
cbpanel.setLayout (new FlowLayout (FlowLayout.CENTER));
/* The editable JComboBox width will not be OK (not wide enough) */
JComboBox cb = new JComboBox (RES_TYPES);
cb.setEditable (true);
cbpanel.add (cb);
add (cbpanel);
/* The non-editable JComboBox width will be OK */
cb = new JComboBox (RES_TYPES);
cbpanel = new JPanel ();
cbpanel.add (cb);
add (cbpanel);
}
public static void main (String [] args) {
JFrame jf = new JFrame ("Editable JComboBox Test");
jf.addWindowListener (new WindowAdapter () {
public void windowClosing (WindowEvent evt) {
System.exit (0);
}
});
ComboTest combotest = new ComboTest ();
jf.getContentPane ().add (combotest);
jf.pack ();
jf.setLocation (300, 300);
jf.setSize (200, 200);
jf.setVisible (true);
}
}