The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

This topic is READ ONLY
import-bot (20211) [Avatar] Offline
#1
[Originally posted by karwatka]

I need a way of making columns not traversable. This means that when I try to
arrow over to a column that I wish to make non-traversable it should skip to
the next traversable column.

Currently when isEditable() returns false it does not allow editing of the
cell but it does allow you to traverse to the cell. This is not desired.
import-bot (20211) [Avatar] Offline
#2
Re: JTable/Table Model isEditable does not = not traversable
[Originally posted by matt]

If you override isEditable() to transfer focus to the next column,
that should do what you want.

Are you talking about selections or cell editing?
import-bot (20211) [Avatar] Offline
#3
Re: JTable/Table Model isEditable does not = not traversable
[Originally posted by karwatka]

> If you override isEditable() to transfer focus to the next column,
> that should do what you want.
>
> Are you talking about selections or cell editing?

I tried to use a traverse focus in the isEditable method but to no avail.

I believe that since the JTable implements is own custom focus handler and
that normal methods of controlling focus do not have an affect.

Also please understand that in relation to focus inside of a JTable the table
is in focus but a cell is not in focus until it is double clicked or a user
starts typing input. Durring the intermediate stage while the table has focus
but no cell has focus, the user is allowed to move to any cell in the table
since isEditable is not yet being called. This movement is what I am trying
to restrict.
import-bot (20211) [Avatar] Offline
#4
Re: JTable/Table Model isEditable does not = not traversable
[Originally posted by matt]

This is a tough problem, and I haven't had any time to investigate.
Hopefully we can make this into a future Swing Connection article.
Sorry I can't help any further at this time.