How do I make a specific word (variable) in a message box bold in Java?

Posted by typoknig on Stack Overflow See other posts from Stack Overflow or by typoknig
Published on 2010-03-14T02:23:32Z Indexed on 2010/03/14 2:35 UTC
Read the original article Hit count: 304

Filed under:
|
|

Hi all, I'm trying to make one word (variable) of a message box bold in my Java program. Here is my code:

int n = messageBox.showConfirmDialog(frame,
"The File "+ file +" already exists." +
"\n" + "Do you want to replace it?",
"File Already Exists!",
messageBox.YES_NO_OPTION);

I want to make the variable "file" appear in bold text in my message box. So far I have only been able to get the entire message box to appear in bold, or none of it at all. How do I do this?

© Stack Overflow or respective owner

Related posts about java

Related posts about messagebox