【5行代码小bug】java有滚动条的textArea
文本框出来了,但没有做出滚动条,代码如下:JPaneltextTicket=newJPanel();JTextAreapublictextshow=newJTextAre...
文本框出来了,但没有做出滚动条,代码如下:
JPanel textTicket = new JPanel();
JTextArea publictextshow = new JTextArea(6,55);
JScrollPane rollingP = new JScrollPane(publictextshow);
rollingP.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
textTicket.add(publictextshow); 展开
JPanel textTicket = new JPanel();
JTextArea publictextshow = new JTextArea(6,55);
JScrollPane rollingP = new JScrollPane(publictextshow);
rollingP.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
textTicket.add(publictextshow); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询