I'm not sure if this is the right way to do this, but this is how I have added an empty row to a TableModel:  when I am creating the Vector for the table model, I always add an "empty" object for the final row.  What I mean by an empty object is an instance of the an object that is of the same type as the objects in your vector, only all of the attributes are null.



"Panagiotis Plevrakis" <[EMAIL PROTECTED]>

05/17/2002 12:05 PM
Please respond to "JDJList"

       
        To:        "JDJList" <[EMAIL PROTECTED]>
        cc:        
        Subject:        [jdjlist] Empty row in JTable


I want to have one empty row at the end of my table. I tried to make my
TableModel's getRowCount() method returning data.size()+1 but it does not
work (the GUI hangs at runtime.) Is it possible to have this empty row?

Thanks,
Panos

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx


To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm


To change your membership options, refer to: http://www.sys-con.com/java/list.cfm

Reply via email to