This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

JTable Cell Editor[JComboBox] Problem

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I have a JTable with one of the cell Editor has
JComboBox.
when i click on the cell with
mouse ,i get the combobox editor
but by using Tab ,i end just getting the cell
without the combobox...

anyclue! what can be wrong ,or what to do!!!
Thanks
vinaya
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, vinay, please re-register with a name that follows the JavaRanch UserName Conventions. Your username needs to be in the format "First Name" + space + "Last Name"...

Are you adding a new TableCellRenderer as well as a TableCellEditor? The TableCellRenderer determines how the table cell normally looks. Also, just tabbing into the cell doesn't tell the table cell you want to edit it... only clicking the cell does that by default.

I've been playing around with this, and it looks like you may be able to do what you want by adding a KeyListener to your TableCellEditor component...

-Nate
 
vinaya kumar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
1) Plz Let me know steps to do changes my login name.[ could not find how to change
the login name]
2) I have added the Key Listener also,
I listen to space,then say combobox.showPopup
but combobox appears and when i press the
combobox disappears and i get an expection
in showpopup.
All i want is a celleditor for a column to be
combobox, and when i traverse to the cell,
i should be able to select a combobox.
Thanks
vinaya
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To re-register, all you have to do is click log out right after "Hello, vinay" under the moose head picture at the top left of this page. Then click register at the top right of this page. Then just fill out your information again, putting vinaya kumar instead of just vinay in the Login Name field.

I've been messing around with some code trying to fix what you want... it looks like the table is "eating" all the key events sent to it... so I'm going to try and find out how to make a table send an event to it's component instead of itself...

-Nate
 
I'm gonna teach you a lesson! Start by looking at this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!