I'm trying to hide the vertical bar of a scrollpane, but I want that it continues scrolling vertically. This is my code:
JScrollPane scroll=new JScrollPane(arbol);
scroll.setBounds(35,40, 230, 530);
scroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scroll.setBorder(null);
scroll.setOpaque(false);
scroll.getVerticalScrollBar().setBorder(null);
scroll.getViewport().setOpaque(false);
JLabel sep=new JLabel(Imagen("SeparaV.png"));
sep.setSize(scroll.getSize());
sep.setLocation(-17, 0);
sep.setHorizontalAlignment(JLabel.RIGHT);
scroll.add(sep);
Frame.add(scroll);
For me it is good, if it only shows the arrows. So this is what I need: