• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JTable Column Heading (SOS!!!)

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic