Like in HTML we can scroll to the specific part of the page using the id of that section, detailed explanation. Is it possible to implement the same in Java desktop application where I have a scroll pane. I could not find any such functionality. Any suggestions would be helpful.
Asked
Active
Viewed 60 times
0
-
What is your specific problem? Sounds like you already know what you want to do and how to do it: Create a JTabbedPane, add a help section to the last Pane and show it when certain conditions are met. – Ben May 15 '18 at 14:15
-
1Welcome to Stack Overflow! It appears that you have not taken the [tour](https://stackoverflow.com/tour). You should consider doing that and reviewing [How to Ask](https://stackoverflow.com/help/how-to-ask). As it stands this question is pretty broad and doesn't demonstrate a lot of effort on your part. – rmlan May 15 '18 at 14:16
2 Answers
-1
where I have a scroll pane
You can control the positioning of the viewport of the scroll pane by using:
scrollPane.getViewport().setViewPosition(...);
So if you know the component you want at the top of the viewport you can get the location of the component and then use that as the Point for the view position.

camickr
- 321,443
- 19
- 166
- 288