Terai Atsuhiro 2021-11-16 (火) 08:22:44

http://terai.xrea.jp/swing/wheelcombo/screenshot.png

combo.addMouseWheelListener(new MouseWheelListener(){
  public void mouseWheelMoved(MouseWheelEvent e){
    JComboBox source = (JComboBox) e.getSource();
    if(!source.hasFocus()) return;
    int ni = source.getSelectedIndex() + e.getWheelRotation();
    if(ni>=0 && ni<source.getItemCount()){
      source.setSelectedIndex(ni);
    }
  }
});