Forum Discussion

hogueybear's avatar
hogueybear
Occasional Contributor
10 years ago

javax.swing.JTable does not scroll to display off screen cell?

From what I read here when I attempt to acces a table cell that is not visible TC should automatically scroll to display the cell.

 

This is not working for my swing jtables?

 

I did the object mapping and have the correct addon's for swing desktop added.

 

Currently using tc version 10.

 

Can I get the x,y coordinates of a table cell?  If yes, then I could write a function to scroll until the cell was visible.

  • I still have not been able to get tc to scroll to the cells automagically, but ...

     

    table.scrollRowToVisible( row#);

    table.scrollColumnToVisible( col # ); 

     

    Work wonderfully for us.

    • hogueybear's avatar
      hogueybear
      Occasional Contributor

      I posted this one first and quickly realized I asked 2 questions and knew that it was unlikely that either would be answered when posted on this board, so I put the second one in the other post.

       

      In this post I am looking for help figuring out why my swing table is not scrolling as it is supposed to in TC per . See the third bullet under "Basic Prnciples"

      • hogueybear's avatar
        hogueybear
        Occasional Contributor

        I still have not been able to get tc to scroll to the cells automagically, but ...

         

        table.scrollRowToVisible( row#);

        table.scrollColumnToVisible( col # ); 

         

        Work wonderfully for us.