Hello everybody,
I tried hard for the comboBox problem that i had earlier mentioned
in my previous mail
(FYI the comboBox problem was:-
the comboBox receives focus even if isFocusTraversable returns true.)
I extended the MetalComboBoxButton (since it is the one that gets the
focus)
as follows
...
public class FOSMetalComboBoxButton extends MetalComboBoxButton {
public FOSMetalComboBoxButton(JComboBox cb, Icon i, boolean onlyIcon,
CellRendererPane pane, JList list)
{
super(cb,i,onlyIcon,pane,list);
System.out.println("abhay: 001");
}
public boolean isFocusTraversable() {
System.out.println("abhay: 002");
return false;
}
}
and i extended the MetalComboBoxUI as follows:
...
public class FOSMetalComboBoxUI extends MetalComboBoxUI {
public FOSMetalComboBoxUI() {
super();
System.out.println("abhay: 003");
}
protected JButton createArrowButton() {
JButton button =
new FOSMetalComboBoxButton( comboBox, new
MetalComboBoxIcon(),
comboBox.isEditable(),currentValuePane, listBox );
button.setMargin( new Insets( 0, 1, 1, 3 ) );
System.out.println("abhay: 004");
return button;
}
}
then i plugged the MetalComboBoxUI into the theme as follows:
public void addCustomEntriesToTable(UIDefaults table) {
...
table.put("ComboBoxUI","fos.client.utils.widgets.FOSMetalComboBoxUI");
...
}
... but all this work didnot give me any results. The focus still
appears
on the comboBox. Can anyone tell me where am i wrong ?
Surprisingly none of the System.out.println 's get executed.
Can anyone tell me why .. or am i missing something very basic ...very
stupid ?
Thankyou in advance.
regards
abhay
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm
Be respectful! Clean up your posts before replying
____________________________________________________