Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-23-2006, 04:15 AM   #1
Registered: Nov 2005
Location: Mauritius
Distribution: PCQLinux, SUSE Linux,Fedora Core 5, Fedora Core 6, Knoppix Live, Kubuntu Edgy, PCLinuxOS
Posts: 167

Rep: Reputation: 30
Question Making a row being Fixed in JTable

Okay I have another question(Seems that no-one is interested in answering the other one...)

I want to know how to make a particular row(Basically the first one) in a JTable not to be Editable though all the others are Editable. In fact, it should act just like a tables's header just that it is vertical.
Old 03-23-2006, 09:06 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled

public boolean editCellAt(int row,
int column,
EventObject e)

Programmatically starts editing the cell at row and column, if the cell is editable. To prevent the JTable from editing a particular table, column or cell value, return false from the isCellEditable method in the TableModel interface.

row - the row to be edited
column - the column to be edited
e - event to pass into shouldSelectCell; note that as of Java 2 platform v1.2, the call to shouldSelectCell is no longer made
false if for any reason the cell cannot be edited
IllegalArgumentException - if row or column is not in the valid range


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Java JTable render problem darkRoom Programming 0 02-03-2006 08:32 PM
Motif Look and feel problem for customized jtable object supsnehal Programming 0 10-11-2005 01:45 AM
ordering row entries rohr Programming 4 04-11-2005 03:36 AM
Java JTable refresh problem dave bean Programming 1 01-06-2005 11:49 AM
Mplayer - Blue row R-mus Linux - Software 1 09-07-2003 01:44 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:18 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration