If I use this function more than once in the programm the tabs stop autoscrolling. Autoscrolling woks with one Tab:
protected JTextArea addTab(String name){
JTextArea tab = new JTextArea();
tab.setEditable(false);
JScrollPane scroller = new JScrollPane(tab);
scroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
this.tabPane.add(name, scroller);
return tab;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.