gitpage blog address https://xisynotz.xyz
modify
error code
JScrollPane scroll = new JScrollPane(jt);
scroll.setViewportView(jt);
scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
jt.setPreferredSize(new Dimension(200,100));
Should
jt.setPreferredSize(new Dimension(200,100));
Change
scroll.setPreferredSize(new Dimension(200,100));