我在开发时对自定义了个新的jcombobox,类名为CustomCombo,但是还想使用和其他jcombobox使用同样的风格化,请问xml文件要如何写?
jcombobox风格化代码
<style id="comboBoxStyle">
<opaque value="TRUE"/>
<state>
<imagePainter method="comboBoxBorder"
path="images/combobox_border.png"
sourceInsets="2 2 2 2"
paintCenter="false"/> />
</state>
<state value="FOCUSED">
<imagePainter method="comboBoxBorder"
path="images/combobox_border_focus.png"
sourceInsets="2 2 2 2"
paintCenter="false"/> />
</state>
<insets top="2" left="2" bottom="2" right="2"/>
</style>
<bind style="comboBoxStyle" type="region" key="ComboBox"/>
jcombobox风格化代码
<style id="comboBoxStyle">
<opaque value="TRUE"/>
<state>
<imagePainter method="comboBoxBorder"
path="images/combobox_border.png"
sourceInsets="2 2 2 2"
paintCenter="false"/> />
</state>
<state value="FOCUSED">
<imagePainter method="comboBoxBorder"
path="images/combobox_border_focus.png"
sourceInsets="2 2 2 2"
paintCenter="false"/> />
</state>
<insets top="2" left="2" bottom="2" right="2"/>
</style>
<bind style="comboBoxStyle" type="region" key="ComboBox"/>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货