resize columns in JTable

Discussion in 'Java' started by Daniel Luis dos Santos, Jan 5, 2010.

  1. Hello,

    I have a JTable on which I set a model derived from AbstractTableModel.
    I then want to put a fixed size on the first column.
    When I get the column model from the table or from the tableheader it is empty.

    How do I synchronize the column model to the table model ?
    How do I set the size attributes of a table column ?
    Daniel Luis dos Santos, Jan 5, 2010
    1. Advertisements

  2. TableHeader? I think you want the TableColumnModel returned by
    getColumnModel(), as shown here:


    If that's not it, you might try posting an <>.
    John B. Matthews, Jan 6, 2010
    1. Advertisements

  3. Daniel Luis dos Santos

    Roedy Green Guest

    Have a look at the code for Vercheck. I put lower and upper bounds on
    each column that the user can adjust within.

    Roedy Green, Jan 6, 2010
  4. Daniel Luis dos Santos, Jan 8, 2010
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.