i trying implement basic gui user can move objects 1 jlist another. jlists should contained within scrollpane size not issue. basic functionality good, items move , remove button presses. however, jlist , jscrollpane items added display correctly , detect if scrollbar necessary not interact @ user reason. user cannot select jlist nor scroll scrollpane. rough idea of code below;
public void createjlist(type[] datatolist){ somescrollpane = new jscrollpane(); //somescrollpane private global somescrollpane.setbounds(numbers here); this.add(somescrollpane); //this custom frame class alist = new jlist<type>(datatolist); somescrollpane.setviewportview(alist);
this rough idea. add listener @ stage since scrollpane isn't working either may leave later. use code both working , non-responsive jlists , scrollpanes same.
of note, call method everytime list want display changed. i'm thinking maybe because jlist , scrollpane keep getting created, broken?
Comments
Post a Comment