Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable Cell Editor

 
shansi raj
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a custom cell Editor which works fine on double click.It has a textfield and a button as the column,the button becomes enabled on double click and textfield in editing mode.But my requirement is when I select a row in the JTable,only the button should be visible but the textfield should remain uneditable.Only on double click it should be enabled.

Thanks
 
Brian Cole
Author
Ranch Hand
Posts: 924
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by shansi raj:
I have a custom cell Editor which works fine on double click.It has a textfield and a button as the column,the button becomes enabled on double click and textfield in editing mode.But my requirement is when I select a row in the JTable,only the button should be visible but the textfield should remain uneditable.Only on double click it should be enabled.

Thanks


You haven't actually asked a question, so I'm not sure what to say
that would be helpful. Next time try something like "My requirement
is when I select a row in the JTable, only the button should be visible
but the textfield should remain uneditable, and I'm having trouble
with the ______ part. What is the best way to achieve ______?"

I will point out, though, that if you're worried about what happens
when you merely "select a row" then the Editor likely isn't involved
yet, so you might want to take a look at your Renderer.
[ December 04, 2008: Message edited by: Brian Cole ]
 
permaculture is giving a gift to your future self. After reading this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!