Java updating resultset
So given that you can add data when the model is created or add data dynamically using the add Row/insert Row methods there is no need to create a custom model.The only common reasons for extending the model would be when you want to change the behaviour of it.
Or you can duplication the add Row(...) method of the Default Table Model and implement the logic in your custom model. Another benefit of a SSCCE is that it gets you thinking in another direction as its all about simplifying the problem.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 all forums There is not need to create a custom Table Model. Have you even looked at the Default Table Model API yet?You can use the Default Table Model to hold the data. If so you would have noticed the following constructor: So all you need to do is create some hard coded data in the Vectors, then create the Default Table Model using these Vectors and then create the JTable using the Default Table Model. Result Set Meta Data; public class Table Add With Custom Model extends JPanel class Table Model Activo extends Abstract Table Model There is no need to use a custom model period.Many times when problem solving the mind gets on a single track.
Another benefit of a SSCCE is that it gets you thinking in another direction as its all about simplifying the problem.