Win a copy of Rust Web Development this week in the Other Languages 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

JTable Cell Editor

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 974
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic