JTextPane columnar data

R

rj

Hi

I've trying to create a report in my java application using a
jtextpane with a styled document. JTextPane has been chosen as it is
the only text component class I can find which will support multiple
font styes in the one document.
I am however having difficuilty in displaying the retrieved data
(based on query search) in a suitable way in the text pane - I cannot
figure out from the api how it is possible to display data in a
columnar way (ie with column headings and data for that column in
alignment with one another) without using a jtable. Is this possible??

Any help will be greatly appreciated.

Thanks,
RJ
 
S

Sandip Chitale

Use JEditorPane which is subclass of JTextPane with the content type property to "text/html" and editable property to false. Then
you can use HTML <table></table> tags or for that matter any other HTMl tags.

HTH,
sandip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top