How to disable specific column selection in JTable?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ValValVal
    New Member
    • Oct 2008
    • 27

    How to disable specific column selection in JTable?

    Hi all.

    I have a JTable with 5 columns. Cell Selection is ON. I want to disable user's ability to select any cell that is on 0-th column. Can't find any info on how to cope with it.

    Thanks in advance,
    Val
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    You can't select individual cells; you can either select rows and/or columns. When both are selected the intersection of the rows and columns makes up the selection and you can't have multiple selection intervals then. That's how a JTable is implemented.

    kind regards,

    Jos

    Comment

    • ValValVal
      New Member
      • Oct 2008
      • 27

      #3
      Thanks Jos for your responce.

      I would like to note that the question was if there is a way to disable user from selecting any cell on specific column (and leaving him/her the ability to select any cell than is not on this "deselected " column).

      Comment

      Working...