wood burning stoves
The moose likes Swing / AWT / SWT and the fly likes JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable" Watch "JTable" New topic


Adrian Krebs

Joined: Apr 10, 2002
Posts: 11
i want to select a row in from a jtable. but it shouldn't be possible to delete the datas. which properties i have to set for this.
Renee Zhang
Ranch Hand

Joined: Sep 10, 2001
Posts: 72
Hi, Adrian,
if you use yourtable.enabled(false), then you can't select anything in the table. If you use JTable youTable = new JTable (data or yourTableModel) {
public boolean isCellEditable(int row, int column) {return false; }; Then you can select the row, but you can't change any data in the table.
I hope it can solve your problem and good luck.
I agree. Here's the link: http://aspose.com/file-tools
subject: JTable
It's not a secret anymore!