Changing text colour in code
On the press of the help button this code is running
Code:
if(evt.getSource()==cmdHelp);
{
optPane1.showMessageDialog(this,
" You can use your mouse or tab key to navigate\n"+
" our body mass calculator.\n\n"+
" New button, this will overwrite all previous\n" +
" files\n\n"+
" Add Record, enables you to add a new member\n" +
" to the records only after creating new file.\n\n"+
" Search button, enter your membership number \n" +
" click search to find member details.\n\n"+
" Update Button, Search for the appropriate record\n"+
" by membership number, amend the details\n"+
" then click the update button\n\n"+
" Select Imperial or Metric for the measurements,\n" +
" enter the height and weight then click convert\n\n"+
" The default measurements are metric, if you \n"+
" select imperial using the radio button you \n"+
" will be advised."+
" \n","User Guide",optPane1.INFORMATION_MESSAGE);}
As usual the text is black, however I wondered if it was possible to change the following only to red leaving the rest black
Code:
New button, this will overwrite all previous\n" +
" files\n\n"+
Thanks in advance