如何使用eclipse更改标签颜色黑莓 [英] How to change Label color in Blackberry using eclipse
本文介绍了如何使用eclipse更改标签颜色黑莓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
能否请你给我任何例如code上的标签颜色,默认显示黑色我想改变颜色的外观和UI中的感觉,请帮助我..
Can you please send me any example code on label color , by default it shows black color i want to change the color for look and feel in UI please help me ..
感谢你
推荐答案
您可以像这样
LabelField label = new LabelField("label"){
protected void paintBackground(Graphics g) {
g.setBackgroundColor(Color.BLUE);
g.clear();
super.paintBackground(g);
}
};
或像这样
LabelField label = new LabelField("label"){
protected void paint(Graphics g) {
int oldColor = g.getColor();
g.setColor(Color.BLUE);
g.fillRoundRect(0, 0, getWidth(), getHeight(), 7, 7);
g.setColor(oldColor);
super.paint(g);
}
};
这篇关于如何使用eclipse更改标签颜色黑莓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文