JViewPort doesn't work with shit+tab
I have a JScrollPane and I've added several components into it from top to bottom, according the layout manager I'm using.
I've also implemented the FocusListener interface, so when one of those components is focused, I execute a method that should keep the component always visible.
publicvoid focusGained(FocusEvent e)
{
Component comp = e.getComponent();
Rectangle rectComp = comp.getBounds();
JViewport jViewPort = jScrollPane1.getViewport();
jViewPort.scrollRectToVisible(rectComp);
}
Actually this piece of code works fine only if I press the TAB key: the JScrollPane object scrolls down and it's ok;
But when I press SHIFT+TAB and the focus goes to the previous component, the JViewPort does nothing and the focused component keeps hidden: the JScrollPane should scroll up.
What is happening ?
Thanks in advance.
-- Lelio.

