How to change the font colour in jstudio

Dear friends

I develop one application in jstudio.I use localizationsurropt and message properties to be used to set the japanese language.And i use net beans to support mobile device.It is a mobile application.The current text colour will be black in message properties.I want to change the text will at different colour.I dont know how to change.Please any one can help me.Its urgent.

regards

sridhar

[427 byte] By [gem] at [2007-11-26 9:51:15]
# 1
How are you displaying the messages? can you post the code snippet that is displaying the messages read from the bundle files?
KarthikR at 2007-7-7 1:03:49 > top of Java-index,Development Tools,Java Tools...
# 2
Hi, I pass the string through Message properties settings.Through the key value i can get the string and diaplay in the code.
gem at 2007-7-7 1:03:49 > top of Java-index,Development Tools,Java Tools...
# 3

For mobility applications, you may also want to try the java mobility and netbeans mobility forums.

Java Mobility forum: http://forum.java.sun.com/category.jspa?categoryID=22

i found the following two related threads:

http://forum.java.sun.com/thread.jspa?forumID=76&threadID=492857

http://forum.java.sun.com/thread.jspa?forumID=76&threadID=697579

btw, mobility module's sources are now available:

http://www.netbeans.org/community/news/index.html#912

KarthikR at 2007-7-7 1:03:49 > top of Java-index,Development Tools,Java Tools...
# 4

> Dear friends

> I develop one application in jstudio.I use

> localizationsurropt and message properties to be

> used to set the japanese language.And i use net

> beans to support mobile device.It is a mobile

> application.The current text colour will be black in

> message properties.I want to change the text will at

> different colour.I dont know how to change.Please

> any one can help me.Its urgent.

>

> regards

> sridhar

Can you provide some more information and details, also perhaps a snippet of code you

are using to deal with the properties ?

Also, is the font color to be different per locale ?

Thanks.

jinternal at 2007-7-7 1:03:49 > top of Java-index,Development Tools,Java Tools...
# 5

I use this program.In program the "str1"used which referred to get the string from message.properties.I pass the string there only.I dont know how to the color in message properties.

public void mPage19(Graphics g){

g.setColor(255,0,0);

bPrint=false;

// g.setColor(70,70,70);

if(temp==4){//Prone Half Lotus

str1=LocalizationSupport.getMessage("BENEFIT1");

}

else if(temp==5){//Head Stand Position

str1=LocalizationSupport.getMessage("BENEFIT2");

}

else if(temp==6){//Shooting Bow Pose

str1=LocalizationSupport.getMessage("BENEFIT3");

}

else if(temp==7){//Intense East Stretch Posture

str1=LocalizationSupport.getMessage("BENEFIT4");

}

else if(temp==8){//Seated Angle

str1=LocalizationSupport.getMessage("BENEFIT5");

}

else if(temp==9){//The Peacock Posture

str1=LocalizationSupport.getMessage("BENEFIT6");

}

else if(temp==10){//Head to Ankle Posture

str1=LocalizationSupport.getMessage("BENEFIT7");

}

else if(temp==11){//Standing Bow Posture

str1=LocalizationSupport.getMessage("BENEFIT8");

}

else if(temp==12){//Expanded leg Stretch

str1=LocalizationSupport.getMessage("BENEFIT9");

}

else if(temp==13){//The Warrior Posture

str1=LocalizationSupport.getMessage("BENEFIT10");

}

}

gem at 2007-7-7 1:03:49 > top of Java-index,Development Tools,Java Tools...
# 6

I am not sure i understand your question hence requesting some clarification:

- Is "g.setColor(255,0,0);" correctly working? Is your problem that something like "g.setColor(70,70,70);" is not working?

- Or does g.setColor() does work correctly and you would like to set the color differently based on locale?

If this is the case , i think you can define a message like "BENEFIT_COLOR=70,70,70" in the properties file (which will of course have different values for different language bundle properties); and then do a 'g.setColor(LocalizationSupport.getMessage("BENEFIT_COLOR"); '...

KarthikR at 2007-7-7 1:03:49 > top of Java-index,Development Tools,Java Tools...