Select « JTextPane « Java Swing Q&A





1. How do I easily edit the style of the selected text in a JTextPane?    stackoverflow.com

How do I easily edit the style of the selected text in a JTextPane? There doesn't seem to be many resources on this. Even if you can direct me to a ...

2. How do I get the style of the selected text in a JTextPane?    stackoverflow.com

I'm trying to create a simple WYSIWYG editor that will allow users to select text and bold/underline/italicise it. Currently the user can select text, right-click it and select bold from a ...

3. Java JTextPane Change Font of Selected Text    stackoverflow.com

I have a JTextPane (or JEditorPane, I can use either no problem). How can I change the font of a selected area to a specific font? textpane.getSelectedText().setFont() won't work. ...

4. JTextPane Synchronize Style Selection UI Problem    stackoverflow.com

I am developing a simple WYSIWYG RTF editor in Java and have a small issue. I need to be able to synchronize the style selection toggle buttons (such as bold, italic, ...

5. Deselect selected text in JTextPane    stackoverflow.com

I have an editor in which I want to check that selected text will not contain some words. If it contains those particular words, then I need to deselect the ...

6. JTextPane - how to style selected text    stackoverflow.com

I am looking for the most simple way to control JTextPane (its inner text) font color and font size within selected text only. I know I must look at StyledDocument but its ...

7. How can I detected which JTextPane is active?    stackoverflow.com

I have two JTextPane in my GUI, and want to make operations on them. So, I need to know which pane is active. Hence, I can select the text and make ...





10. how do I change the font and color of selected text in a jtextpane?    forums.oracle.com

I have figured out how to change the highlighter color of the text I select so it appears highlighted....but how do I actually change the physical color/font of this section of text? if(temp == 4) { int start = jTextPane1.getSelectionStart(); int end = jTextPane1.getSelectionEnd(); jTextPane1.setSelectionColor(tempColor); jTextPane1.setSelectionStart(start); jTextPane1.setSelectionEnd(end); } can I do this with a jtextarea? jtextedit? thanks, Alishi

11. JTextPane select method    forums.oracle.com