java - Remove border from JScrollPane -


i have jlist object in jscrollpane , jscrollpane inside of jpanel.

jlist memberslist = new jlist();  jpanel memberspanel = new jpanel(); memberspanel.setlayout(new borderlayout());  jscrollpane scrollpane = new jscrollpane(memberslist);  memberspanel.add(scrollpane, borderlayout.center); 

i tried set borders of memberslist, memberspanel , scrollpane null. tried:

border emptyborder = borderfactory.createemptyborder(0, 0, 0, 0); memberslist.setborder(emptyborder); memberspanel.setborder(emptyborder); scrollpane.setborder(emptyborder); 

but somehow can't remove border. doing wrong?

the scroll pane has viewport can have own border.

scrollpane.setviewportborder(null); 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -