I finally succeed! the trick is that the ComboBox does not have the same components after changing the UI :
when listing the components before setUI method call :
class javax.swing.plaf.metal.MetalComboBoxButton
class javax.swing.CellRendererPane
class javax.swing.plaf.metal.MetalComboBoxEditor$1
when listing the components after setUI method call :
class kcomponent.MyComboBox$1$1
class javax.swing.plaf.basic.BasicComboBoxEditor$BorderlessTextField
class javax.swing.CellRendererPane
I then came to remove MouseListeners of these components and it worked on the second MouseListener of the first component : MyComboBox$1$1. But the cursor was still different (mouse pointer instead of a carret positioner), then I removed it entirely and it finally worked great!
Here is my corrected code :
public class MyComboBox<E> extends JComboBox<E> {
public MyComboBox(E[] list) {
super(list);
this.setEditable(true);
this.setUI(new BasicComboBoxUI() {
@Override
protected JButton createArrowButton() {
return new JButton() {
@Override
public int getWidth() {
return 0;
}
};
}
});
this.remove(this.getComponent(0));
}
}