public static void setScrollBarStyleId ( final JScrollPane scrollPane, final String styleId )
{
final JScrollBar vsb = scrollPane.getVerticalScrollBar ();
if ( vsb != null )
{
final ScrollBarUI vui = vsb.getUI ();
if ( vui instanceof WebScrollBarUI )
{
final WebScrollBarUI ui = ( WebScrollBarUI ) vui;
ui.setStyleId ( styleId );
}
}
final JScrollBar hsb = scrollPane.getHorizontalScrollBar ();
if ( hsb != null )
{
final ScrollBarUI hui = hsb.getUI ();
if ( hui instanceof WebScrollBarUI )
{
final WebScrollBarUI ui = ( WebScrollBarUI ) hui;
ui.setStyleId ( styleId );
}