Is there any way to enable horizontal scroll-bar whenever necessary?
The situation was as such: I’ve a JTable, one of the cells, stored a long length of data. Hence, I need to have horizontal scroll-bar.
Anyone has idea on this?
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.
First, add your
JTableinside aJScrollPaneand set the policy for the existence of scrollbars:Then, indicate that your JTable must not auto-resize the columns by setting the
AUTO_RESIZE_OFFmode: