Swing中的AbstractTableModel,jtable和DefaultTable模型有什么区别? [英] what is the difference between AbstractTableModel ,jtable and DefaultTable model in swing?

查看:90
本文介绍了Swing中的AbstractTableModel,jtable和DefaultTable模型有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨......


我是秋千上的新手,我想在示例中使用表格,但我无法理解AbstractTableModel,jtable和DefaultTable模型之间的区别吗?

所以请帮助我...我看到了oracle链接,但听不懂...
所以您能给我一些其他想法还是链接

hi....


i m new in swing i want to use table in my example but i can not got the difference between AbstractTableModel ,jtable and DefaultTable model ?

so please help me... i was saw oracle link but can not understand...
so can you give me some other idea or link

推荐答案

,您可能需要阅读以下内容:

Java教程-如何使用表 [
you might want to read this:

The Java Tutorials - How to Use Tables[^]



The JTable is the graphical view on your table. You can fill it directly with Arrays of Strings - but that does not happen often. Normally you will need a TableModel - you should extend AbstractTableModel for that - which is the data representation for the table.

Follow the Tutorial and make yourself a "playground" beside the real project for that.


这篇关于Swing中的AbstractTableModel,jtable和DefaultTable模型有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆