• 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

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how can I change column width and column marzin in JTable.

I have inserted icons in JTable.

can i give individual column size
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by ramesh kancherla:
how can I change column width and column marzin in JTable.

I have inserted icons in JTable.

can i give individual column size

 
Darryl Burke
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Darryl Burke:
[QB][/QB]



Sorry, first post here, clicked the "Add Reply" prematurely.

You can obtain a TableColumn object reference by calling JTable#getColumn (or JTable#getColumnModel#getColumn) and setPreferredWidth of the TableColumn.

There is no direct concept of "margin" for a TableColumn but you can achieve the desired result by a call to JTable#setIntercellSpacing.

Please consult the API for these methods, and if anything's not clear feel free to ask.
reply
    Bookmark Topic Watch Topic
  • New Topic