I am facing a problem in JTextPane. Actually we are creating a editor like application in Java Swing. In JtextPane we type the matter and set some metter as heading1, heading2 so on as user required and some matter as simple story. My problem is that how can we seperate or find which text is heading and which is normal text. Please help me.