java - Scrollable JPanel to return to the top of the panel after an event -
i have scrollable jpanel accepts other jpanels dynamicly.
scrollpane = new scrollpane(); jpanel2 = new jpanel();// container jpanel jpanel2.setbackground(color.pink); jpanel2.setlayout(new gridlayout(0, 1)); scrollpane.add(jpanel2); add(scrollpane, borderlayout.center);
the program can add , delete jpanels jpanel , scroll. when jpanel getting bigger , add jpanel container jpanel have scroll bar @ top.
Comments
Post a Comment