Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable Column Heading (SOS!!!)

 
Chhaya Dhanani
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
I have a table which is generated dynamically after picking up values from a text file.
The problem is the column title are very long strings say for eg:
"Number Of Undebited Items Per Transaction"
What happens is since the title is very long, it appears in one line thus increasing the column size
Can i have the title such that it rolls over to the next line and the column size remains small,like:
i want the column heading to go on the next line
----------------------|
Number Of Undebited |
Items per Transaction |
----------------------|
12345890 |
----------------------|
I have a deadline till tomorrow morning
Please consider this as an SOS and help me
Thanx in advance
Chhaya
 
Dave Rivera
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chhaya Dhanani:
hi all,
I have a table which is generated dynamically after picking up values from a text file.
The problem is the column title are very long strings say for eg:
"Number Of Undebited Items Per Transaction"
What happens is since the title is very long, it appears in one line thus increasing the column size
Can i have the title such that it rolls over to the next line and the column size remains small,like:
i want the column heading to go on the next line

The examples at this url may help:
SwingExamples
[This message has been edited by Dave Rivera (edited May 23, 2001).]
[This message has been edited by Dave Rivera (edited May 23, 2001).]
[This message has been edited by Dave Rivera (edited May 23, 2001).]
 
mohana konakanchi
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
just add \n to your header.
ex: single line header
Object[]= {"mohana konkanchi is my name"}
change it to
Object[]={"mohana konakanchi\n is my name"}
hope this will help
Mohana
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic