[英]create popup table with database data inserted
ok this is a theoretical question. 好的,这是一个理论问题。 say I have a database connection set up and I run the query 说我已经建立了数据库连接,然后运行查询
"select * from securitysystem.employee"
and I wanted to populate a table that would autofit the data returned from the query. 我想填充一个表,该表将自动拟合查询返回的数据。 How would I do this? 我该怎么做?
Steps: 脚步:
DefaultTableModel
). 为数据构建表模型时,它要么需要处理您的对象集合,要么需要将其转换为它可以处理的数据格式( DefaultTableModel
示例Object [] [])。 You need to get that data back as a double array somehow (ideally you want a table model of some sort, but for quick and dirty a double array is fine). 您需要以某种方式将数据作为双精度数组取回(理想情况下,您需要某种类型的表模型,但是对于快速又脏的双精度数组来说,这是很好的选择)。
That should do it. 那应该做。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.