带有滚动条的JScrollPane到左边
我需要在JScrollPane的内容左侧放置一个滚动条。 可以在没有单独的JScrollBar组件的情况下完成吗? 也许只是通过设置一些对齐?
使用反复试验我发现了
JScrollPane.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
像魅力一样工作。
我尝试在css类.jspVerticalBar
中将轨道div的对齐方式从“右”更改为“左”。 似乎工作。
.jspVerticalBar { position: absolute; top: 0; left: 0; width: 16px; height: 100%; background: red; }