paredes_mynor
asked on
View the current row in a JdbTable
For example, if I have a 10 row jdbtable height view, and I'm in the row 20.
How do I do to programmaticaly send the view to the row 1? I mean, put the row 1 as the current in the jdbtable and show it like it.
Thanks.
How do I do to programmaticaly send the view to the row 1? I mean, put the row 1 as the current in the jdbtable and show it like it.
Thanks.
How can you have a 10 row table and be at row 20?
ASKER
Maybe I didn't explain it well. I have a Table scroll pane, with a 10 row height view, and a jdbtable with "n" number of rows. I'm scrolled down in row 20, and I want to set row no. 1 to be the current.
Thanks.
Thanks.
You'll need to figure out the height of your rows, the use the setScrollPosition() in the ScrollPane.
ASKER
I'm sorry, I didn't undestand your answer. Another thing, there's no setScrollPosition() method in either JdbTable or TableScrollPane classes.
Thanks.
Thanks.
Ah. TableScrollPane. Hmm. I thought you meant a JScrollPane containing your Table. Sorry.
Is there no equivalent in your TableScrollPane (eg. setVisibleRow() or scrollToRow() or anything like that)?
I've never used the class, so it's just a thought.
Is there no equivalent in your TableScrollPane (eg. setVisibleRow() or scrollToRow() or anything like that)?
I've never used the class, so it's just a thought.
ASKER
No, there's none similar to those. I'll continue looking. If you find something, I'll appreciate that a lot.
Thks.
Thks.
According to this page:
http://pipin.tmd.ns.ac.yu/extra/java2/libs/dbswing/ref/dbswing/com.borland.dbswing.TableScrollPane.html
TableScrollPane extends JScrollPane, so it should have inherited the setScrollPosition() method (unless I've got the wrong TableScrollPane ;-))
http://pipin.tmd.ns.ac.yu/extra/java2/libs/dbswing/ref/dbswing/com.borland.dbswing.TableScrollPane.html
TableScrollPane extends JScrollPane, so it should have inherited the setScrollPosition() method (unless I've got the wrong TableScrollPane ;-))
ASKER
Yes, you're right. But there's no setScrollPosition() method. The one that has setScrollPosition() is ScrollPane class, and JScrollPane extends JComponent, that is another branch from java.awt.Container. Both ScrollPane and JComponent extend java.awt.Container at the same level.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.