title: formatting text in jdialog box
body: <p>I have a JOptionPane:</p>
  
  <pre><code>JOptionPane.showMessageDialog(null, text);
  </code></pre>
  
  <p>The text is a sting:</p>
  
  <pre><code>String text = "Hello world."
  </code></pre>
  
  <p>What I want to do is change the color of the text, specifically a single word, lets say 'Hello'. SO what I've tried is:</p>
  
  <pre><code>String t1 = "Hello";
  String t2 = "world."
  Font serifFont = new Font("Serif", Font.BOLD, 12);
  AttributedString as = new AttributedString(t1);
  as.addAttribute(TextAttribute.FONT, serifFont); 
  as.addAttribute(TextAttribute.FOREGROUND, Color.red);
  
  
  JOptionPane.showMessageDialog(null, as+t2);
  </code></pre>
  
  <p>I'm not familiar with attributedtext() and this wont work. It does this: </p>
  
  <p>"java.text.AttributedString@479c479cworld"</p>
  
  <p>Is there a step I'm missing? Is this not the right way? Any suggestions?</p>