java jtable defaulttablemodel,JTable与自定义TableModel

I am trying to implement a JTable on a Java GUI that can fill itself with values from a file and allow the user to make modifications to various cells. Since I'm using the GUI editor in the Netbeans IDE, my first instinct was to add the JTable to my form from the palette. however, I quickly realized that I couldn't add more than 100 rows to the table (for my application i'd need around 500+). additionally, while searching for a solution to this problem, I noticed a lot of people saying to use a Custom TableModel instead of using the JTable because it is more robust/efficient.

first, is there a way to add more than 100 rows to a JTable? secondly, is using the JTable (which uses the DefaultTableModel) really a bad implementation? my form is pretty complex, so I would prefer to use the GUI editor to adjust the size, position, etc. of my JTable as opposed to hard-coding it.

解决方案is there a way to add more than 100 rows to a JTable?

Why is 100 a limit? That sounds like your IDE, not the DefaultTableModel. Tens of thousands of rows is no problem for the DefaultTableModel (not that any user would want to look at all that data).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值