Cell Disable « JTable « Java Swing Q&A





1. Disabling a cell of the JTable    coderanch.com

2. Disabling a cell in JTable    coderanch.com

Thanks Mike, Sorry for not providing the complete information. This is a calendar application, and the method /*public boolean isCellEidtable(int row,int column) { return false; }*/ always should returns false. All i wanted is to restrict any action on a particular cell.(for example: a cell containing a particular date(say august 24)should be unseletable). appretiate your help.

3. Disabling a cell    coderanch.com

4. enabling and disabling single cell in JTable    coderanch.com

Thanks pete for your reply. Below is the runnable example of my code. import java.awt.Component; import java.util.Date; import javax.swing.AbstractCellEditor; import javax.swing.JTable; import javax.swing.UIManager; import javax.swing.event.TableModelEvent; import javax.swing.event.TableModelListener; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer; import org.jdesktop.swingx.JXDatePicker; public class MyFrame extends javax.swing.JFrame { public MyFrame() { try{ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); }catch (Exception e){ e.printStackTrace(); } initComponents(); /* My problem is in below part of code. ...

5. Disabling multiple single cells    coderanch.com

Hi all, Im trying to disable certain cells in a single row based on what the user selects in the first cell. I'v wrote a mini version of my problem. I looked at the other threads that asked the same basic question but i cant get my isCellEditable method to work(always returns true). Any ideas as to what i'm doing wrong? ...

6. How to disable(Unedit) a cell in JTable?    java-forums.org

I am developing a application in NetBeans. In this application, I am using JTable. Based on a value given in a JTable Cell, another column in that row should be disabled(i.e that cell could not be editable). For example, if i give "Cash" in the 2nd Column of a row,then the 3rd column of that row should be disabled. How to ...

7. disable some cell in jtable    forums.oracle.com

Twice before you've been asked to post Swing questions in the Swing forum.... Did you even bother to search the Swing forum before posting the question. It has been asked and answered several times in the Swing forum. If you use the proper forum for searching then you will find the answer easier.