I’m trying to make JTextPane with two columns, both aligning to left like that:
Column A: Column B: Alpha Alpha Beta Beta Gama Gamma
Is there anyway to do this on JTextPane, and if not, what can I use for it?
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.
You can simply use tabulation to create columns “visibility”:
In some cases one “\t” might not be enough to create equal spacing (for example if you will have some long text in 1st column).
Anyway, its better choice to use JTable instead, if you need a table-like structure.