File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JComboBox in the JTable Editor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JComboBox in the JTable Editor" Watch "JComboBox in the JTable Editor" New topic

JComboBox in the JTable Editor

Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 290

Hi All

I have a JTable which is having the JComboBox as a Cell Editor.
Where JTable has the Selection Listner, Where i can select single row.

Problem is when i try to select the row, by clicking on the JComboBox cell, the both ComboBox DropDown and the Table Row selection listner will trigger.
So the Drop down will go off.. and selection will happen.

so i need to click twice to see the JCombobox dropdown menu.

Please help me how i can handle this.

Thanks in advance

Ranganathan Kaliyur Mannar

Joined: Oct 16, 2003
Posts: 1100

You need to make use of the method setClickCountToStart(). This has been discussed most recently here

jQuery in Action, 3rd edition
subject: JComboBox in the JTable Editor
jQuery in Action, 3rd edition