Hello,
In a dialog box i am using JComboBoxes .In left side ComboBox in
the drop
down list i can use arrow keys . But in the right side ComboBox in the
drop list
arrow keys are not working .. Any idea what should be the problem .
The following is the code i have used .
Regards,
jude
try {
ivjagreementInitiatorComboBox = new JComboBox();
ivjagreementInitiatorComboBox.setName("agreementInitiatorField");
ivjagreementInitiatorComboBox.setPreferredSize(new
Dimension(150, 20));
ivjagreementInitiatorComboBox.setMaximumSize(new Dimension(6000,
20));
ivjagreementInitiatorComboBox.setAlignmentX(LEFT_ALIGNMENT);
ivjagreementInitiatorComboBox.setEnabled(true);
for (int i = 0; i < agreementupdateStrings.length; i++) {
ivjagreementInitiatorComboBox.addItem(agreementupdateStrings[i]);
}
ivjagreementInitiatorComboBox.setToolTipText("Initiator of the
replication agreement.");
ivjagreementInitiatorComboBox.setRequestFocusEnabled(true);
// ivjagreementInitiatorComboBox.setAlignmentX(LEFT_ALIGNMENT);
} catch (java.lang.Throwable ivjExc) {
handleException(ivjExc);
hiwa - 12 Jan 2004 11:18 GMT
> Hello,
>
[quoted text clipped - 33 lines]
> } catch (java.lang.Throwable ivjExc) {
> handleException(ivjExc);
Q1: Is this left side or right side?
Q2: Could you show the code for another JComboBox?
Q3: Is validate() called in your container?
(after xxxSize() methods are called on the component)
jude - 14 Jan 2004 06:20 GMT
Hello,
I am not using Is validate() is my container
It is right side of the container .. ( -> )
The another ComboBox code is ..
if (ivjknowledgeTypeComboBox == null) {
try {
ivjknowledgeTypeComboBox = new JComboBox();
ivjknowledgeTypeComboBox.setName("knowledgeTypeField");
ivjknowledgeTypeComboBox.setPreferredSize(new Dimension(150, 20));
ivjknowledgeTypeComboBox.setMaximumSize(new Dimension(6000, 20));
ivjknowledgeTypeComboBox.setEnabled(true);
ivjknowledgeTypeComboBox.setToolTipText("Type of references to
naming contexts to be shadowed.");
ivjknowledgeTypeComboBox.setRequestFocusEnabled(true);
for (int i = 0; i <
ReplicationDetails.shadowKnowledgeTypeStrings.length; i++) {
ivjknowledgeTypeComboBox.addItem(ReplicationDetails.shadowKnowledgeTypeStrings[i]);
}
} catch (java.lang.Throwable ivjExc) {
handleException(ivjExc);
}
}
return ivjknowledgeTypeComboBox;
}
Regards,
jude
> > Hello,
> >
[quoted text clipped - 38 lines]
> Q3: Is validate() called in your container?
> (after xxxSize() methods are called on the component)
Andrew Thompson - 14 Jan 2004 11:54 GMT
....
| The another ComboBox code is ..
http://www.physci.org/codes/sscce.jsp
We need self contained code, not just
snippets, jude.
Andrew Thompson - 12 Jan 2004 12:33 GMT
..
| In a dialog box i am using JComboBoxes .In left side ComboBox in
| the drop
| down list i can use arrow keys . But in the right side ComboBox in the
| drop list
| arrow keys are not working .. Any idea what should be the problem .
What do you mean when you say
'left' and 'right' JComboBox?
Only one is ever instantiated.
But then, it's a bit hard to tell what you
are doing without an SSCCE..
http://www.physci.org/codes/sscce.jsp
--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site