下载JTable中的内容(Drop down content in JTable)

编程入门 行业动态 更新时间:2024-10-21 06:26:46
下载JTable中的内容(Drop down content in JTable)

我想在JTable的每一行中显示数据库中的所有类别。 现在,当我点击JTable的每一行时,我需要显示其下的产品列表(被视为该类别的子项)作为下拉列表而不是作为下拉列表,当焦点丢失时自动关闭,但它应该保持直到我点击同一行中的最小化图标。 这就像扩展内容一样。 所以我可以单独扩展所有类别。 工作类似于JTree,但我需要它在JTable中,以便我可以以适当的格式显示每行的更多信息。 有任何想法吗 ?

I want to show all the categories in the database in each line of a JTable i have done that. Now when i click on the each row of JTable i need to show the list of products under it (considered as child of the category) as a drop down not as a drop down list which closes automatically when focus is lost, but it should stay there until i click on minimize icon in the same row. It is just like expanding content. so i can expand all categories individually. The working is similar to JTree but i need it in JTable so that i can show more information on each row in a proper format. Any ideas ?

最满意答案

您需要TreeTable功能。 我打赌这篇文章会对你有所帮助。

You need TreeTable functionality. I bet this article will help you.

更多推荐

本文发布于:2023-08-06 16:38:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1454077.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内容   JTable   content   Drop

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!