I am creating a notepad application .... and I want to change the font of the selected text in the JEditorPane .... but when I change the font now ... it changes the font of the whole text .... same is the problem with background and foreground colors.... :o

You need more then a simple TextArea. Take a look at javax.swing.JEditorPane.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.