[英]Rollover effect for buttons in a table?
I can add buttons to a table with TableCellRender
, but those buttons look different from normal buttons, eg, when the mouse is over, there's no rollover effect. 我可以使用TableCellRender
将按钮添加到表中,但是这些按钮看起来与普通按钮不同,例如,当鼠标悬停在上方时,没有任何滚动效果。 Anyone know how to make buttons in a table look and feel the same as normal buttons? 有人知道如何使表格中的按钮与普通按钮具有相同的外观和感觉吗?
Short example provide in link which demonstrates approach on a checkbox renderer. 链接中的简短示例提供了演示复选框渲染器方法的信息。 The example extends default BooleanRenderer. 该示例扩展了默认的BooleanRenderer。 The only change is getModel().setRollover(...) in getTableCellRendererComponent()
唯一的变化是getTableCellRendererComponent()
getModel()。setRollover(... getTableCellRendererComponent()
Rollover Effect in JTable Checkbox. JTable复选框中的滚动效果 。
Hope this link help you to achieve rollover effect by implementing for your Button in Jtable. 希望此链接通过在Jtable中实现Button来帮助您实现过渡效果。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.