JScrollPane

Hi All,

I have a problem in JscrollPane .

In my swing application , I have used JScrollPane , now on thic pane

the horizontal scrollbar is bydefault is on the left side of this pane ,

I want to replace it on the middle of the pane ,

can anybody help me

Thanks ,

Satya

[325 byte] By [satya_smilea] at [2007-10-3 1:04:35]
# 1

What do you mean, in the middle? No, you don't want that, because your users will kill you in a horrible way.

What you might want is to use two scroll panes side-by-side, with one's *vertical* scrollbar not showing, and its position being updated whenever the other's scrollbar changes.

CeciNEstPasUnProgrammeura at 2007-7-14 18:00:58 > top of Java-index,Java Essentials,Java Programming...
# 2

I assume your question refers to the draggable part of the scrollbars, and you want the JScollPane to be horizontally centered ... In this case I'd try to set the current view position of the JScrollPane's viewport:

scrollPane.getViewport().setViewPosition(/* calculate the position and put it in here */);

quittea at 2007-7-14 18:00:58 > top of Java-index,Java Essentials,Java Programming...