*
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JComboBox in the JTable Editor" Watch "JComboBox in the JTable Editor" New topic
Author

JComboBox in the JTable Editor

Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 289

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


-Chiru
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1076
    
  10

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


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JComboBox in the JTable Editor
 
Similar Threads
JTable configuration
Select vs Edit in JTable
Jtable without cell selection?
JTable
problem displaying jtable values