Question: Hi, I have question while insert scroll bar into text area by using java swing. There is my code, and I want the DISPLAY text
Hi, I have question while insert scroll bar into text area by using java swing. There is my code, and I want the DISPLAY text area have horizontal and vertical scroll bars which are not visible at launch but must become visible if the displayed text is more than 16 lines and more that 40 columns by use JScrollPane()). I hope you can help me to modify my code. I have already add the scroll bar into the Display text area.
I hope you can help me modify my code, Thank you!
/** set the display text area */ display = new JTextArea(); display.setEditable(false); display.setAlignmentX(Component.LEFT_ALIGNMENT); scrollPane = new JScrollPane(display);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
