且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在其他单元格上单击更改单元格背景

更新时间:2023-02-04 19:58:20

您***能够使用 AbstractButton中的,如的 的JButton ,其中包括这种能力对每个支持的外观和放大器;感觉。您可以使用覆盖默认值 UIManager.put()的按钮相关的按键,下面列出,如图所示的此处。这 CellTest 也可以提出一些想法。右键单击以查看上下文菜单,标签查看焦点侦听器是如何工作的。

You'd be better to use an AbstractButton, such as JButton, which includes this capability for each supported Look & Feel. You can override the defaults using UIManager.put() for button-related keys, listed below, as shown here. This CellTest may also suggest some ideas. Right-click to see the context menu, and tab to see how the focus listener works.


Button.background
Button.border
Button.darkShadow
Button.defaultButtonFollowsFocus
Button.disabledText
Button.font
Button.foreground
Button.highlight
Button.light
Button.margin
Button.opaque
Button.select
Button.shadow
Button.textIconGap
Button.textShiftOffset