title: Swing : font color & strike color in JTextPane
body: <p>I have a JTextPane in which text color is set as blue by default. Now i added strike-through on text then strike-through color becomes as same of text (blue).  I want the color of text and strike-through different. e.g. if text color is blue then the strike-through must be different.</p>
  
  <p>Please give me some idea.</p>
  
  <pre><code>    JTextPane text = new JTextPane();
  
      Font font = new Font("Serif", Font.ITALIC, 20);
      text.setFont(font); 
  
      text.setForeground(Color.BLUE); 
  
      Style style = text.addStyle("Bold", null);
      StyleConstants.setStrikeThrough(style, true);
  
      text.setCharacterAttributes(style, false);
  </code></pre>