Search Results

Search found 1 results on 1 pages for 'bgould'.

Page 1/1 | 1 

  • Need Java Swing equivalent of "scrollIntoView" from Browser DOM

    - by bgould
    I have a JPanel with several levels of child components, also with a JScrollPane. I'm placing a focus listener on some of the child components to add some behavior to those components, but I would also like to have that component scroll into the JPanel's viewport when focus is gained. My question is, does anyone have a general purpose function to do this, similar to the browser DOM function "scrollIntoView"? I've tried muddling through this with various inputs to JComponent.scrollRectToVisible but I guess I haven't figured out the magic word. Thanks in advance.

    Read the article

1