I need to make a scroll box that can contain an unknown number of elements. Namely it needs to be able to scroll. I’m not quite sure how to do this. Please help.
I need to make a scroll box that can contain an unknown number of
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use a JScrollPane with a JPanel wraped inside it. That way, you can add any number of elements to the JPanel without exceeding the panel’s physical size using the JScrollPane.
Here is one part of the very famous oracle tutorial that explains the JScrollPane element:
http://download.oracle.com/javase/tutorial/uiswing/components/scrollpane.html
I hope this helps!