Results 1 to 4 of 4
  1. #1
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default word wrap text in rows of Jtable

    Hi,

    I am using a defaulttable model for a jtable.I want to wrap the text for all columns.please suggest how can I word wrap?

    Thanks,

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,452
    Rep Power
    20

    Default

    Nothing to do with the model. Use an appropriate renderer (and editor, if the cells are to be editable).
    How to Use Tables (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)

    db

  3. #3
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default

    Thanks for the reply.Is there any other way out.
    If I am able to make the column extendable like user could use the move to adjust the length of the coulmn.

    Thanks,
    Manshu

  4. #4
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default

    Thanks.I have achieved this via a cell renderer.Thanks for the article

Similar Threads

  1. Jtable rows
    By riddhishah28 in forum AWT / Swing
    Replies: 3
    Last Post: 02-18-2011, 07:24 AM
  2. Creating a word wrap
    By huntrguy102 in forum New To Java
    Replies: 25
    Last Post: 11-01-2010, 02:03 AM
  3. Remove Jtable rows
    By anilkumar_vist in forum Advanced Java
    Replies: 2
    Last Post: 09-17-2010, 09:03 AM
  4. Word Wrap not functioning correctly?
    By zerkz in forum New To Java
    Replies: 2
    Last Post: 10-08-2009, 07:41 PM
  5. display rows in jtable
    By osval in forum AWT / Swing
    Replies: 1
    Last Post: 08-06-2007, 09:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •