javaswingjscrollpanejscrollbar

overlapping a scrollbar with panel "java"


when the mouse entered in scrollbar automatically this scrollbar send to fond example :

https://i.sstatic.net/H24QN.png

when the mouse entered in scrollbar

https://i.sstatic.net/l3YIs.png

thanks and sorry for my english


Solution

  • I found the solution:

    scrollPane.getHorizontalScrollBar().setOpaque(false);
    

    for the scroll bar I use the Windows 10 scroll bar

    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());