我试图在我的 Java 程序中使消息框的一个单词(变量)变为粗体。这是我的代码:
int n = messageBox.showConfirmDialog(frame,
"The File "+ file +" already exists." +
"\n" + "Do you want to replace it?",
"File Already Exists!",
messageBox.YES_NO_OPTION);
我想让变量“文件”在我的消息框中以粗体显示。到目前为止,我只能让整个消息框以粗体显示,或者根本没有。我该怎么做呢?