how can i increase the font of a string

Hi friends,

I just wanted to know of how to increase the font size of a string,also color of dat particular string...............

The code is like this.........

static void setABCTitle(String strABCRange) {

String strTitle = "Test Message";

strABCRange = (strABCRange == null) ? "" : strABCRange .trim();

strABCRange = strABCRange .replaceAll("to", "-");

if(!strABCRange .equals("")) {

strTitle =( strTitle + " : ABC Range " + strABCRange );

}

mainFrame.setTitle(strTitle);

}

Plzzzzz..........help me out ..........

I just wanted to increase this font size of ABCRange and also want to put a different color for the same.......................

[729 byte] By [chandrashekar9274a] at [2007-11-27 8:24:27]
# 1
Strings don't have a font. The things that display Strings do.
RedUnderTheBeda at 2007-7-12 20:13:29 > top of Java-index,Desktop,Core GUI APIs...
# 2
okie i understand.........but whats the way to increase the size of the string..............is there any other way out?
chandrashekar9274a at 2007-7-12 20:13:29 > top of Java-index,Desktop,Core GUI APIs...
# 3

Hello Chandra,

from your code I see that you want to increase the size of the window title (Why don't you say so immediately?). AFAIK this is handled by the operating system and not by the java machine.

I don't know a way how to achieve this. But maybe we are taught by someone more experienced in this matter.

Regards

J鰎g

Joerg22a at 2007-7-12 20:13:29 > top of Java-index,Desktop,Core GUI APIs...
# 4
"Text Component Features": http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html
camickra at 2007-7-12 20:13:29 > top of Java-index,Desktop,Core GUI APIs...
# 5
Hello Camickr,I looked at the link you provided, but could not find anything indicating how to increase a window's title string. Would you be so kind and point out more precisely?RegardsJ鰎g
Joerg22a at 2007-7-12 20:13:29 > top of Java-index,Desktop,Core GUI APIs...
# 6

As said, the title pane is painted either by OS (in which case you have absolutely no control from Java) or by the current LAF (if you're running under decorated mode *and* the LAF you're using supports decorated mode). AFAIK, no LAF provides the option that you're looking for (changing the font size for the title pane only).

kirillga at 2007-7-12 20:13:29 > top of Java-index,Desktop,Core GUI APIs...
# 7
> from your code I see that you want to increase the size of the window title Sorry, I didn't look that closely at the question. I don't know how it can be done.
camickra at 2007-7-12 20:13:29 > top of Java-index,Desktop,Core GUI APIs...