Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
TDD for a Shopping Website LiveProject
this week in the
Testing
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:
Campbell Ritchie
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
Swing / AWT / SWT
how to make specific jtable column uneditable?
mahmoud saleh
Greenhorn
Posts: 19
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
hi there
i want to know how to make specific column in jtable uneditable?
pete stein
Bartender
Posts: 1561
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
As with your recent post: What have you tried so far, and where are you stuck? If what you need is a code-writing service, you may look to rentacoder.com
[ September 07, 2008: Message edited by: pete stein ]
Craig Wood
Ranch Hand
Posts: 1535
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
For a JTable extension you can override the
isCellEditable
method to control editing in columns:
class Pseudo extends JTable { int noEditColumnIndex = 1; public boolean isCellEditable(int row, int col) { int modelCol = getColumnModel().getColumn(col).getModelIndex(); return (modelCol != noEditColumnIndex); } }
The TableModel classes also have an
isCellEditable
method you can override to return the desired result.
mahmoud saleh
Greenhorn
Posts: 19
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
thanks,that's what i need
I don't get it. A whale wearing overalls? How does that even work? It's like a tiny ad wearing overalls.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
JTable
Making JTable uneditable
JTable for accepting data
[JTable] Non editable cells on editable column
JTable question
More...