jtextpane Questions
5
In all versions of Java up to 6, the default behaviour of a JTextPane put inside a JScrollPane was: wrap lines at word boundaries if possible. If not, then wrap them anyway.
In JDK 7, the default ...
5
I am creating a text editor using a JTextPane that allows the user to change the color of selected text. But when the user selects the text, then chooses the option to change the color (say, to red...
Bassist asked 30/9, 2013 at 16:13
6
Solved
How do I change the color of specific words in a JTextPane just while the user is typing?
Should I override JTextPane paintComponent method?
1
How do I use javax.swing.text.AsyncBoxView to delegate text layout in JTextPane to a non-EDT thread?
I've hit the performance limits of JTextPane, while trying to implement a console style component. For the most part, my console behaves quite well, but attempts to spam it with large amounts of no...
Raisaraise asked 22/5, 2020 at 14:33
1
I am working on creating a logger to show output as part of a larger Java swing GUI. Unfortunately I was experiencing a slowdown after adding it. I have traced the problem to repeated calls of Docu...
4
Solved
I have the following "tree" of objects:
JPanel
JScrollPane
JPanel
JPanel
JScrollPane
JTextPane
When using the mouse wheel to scroll over the outer JScrollPane I encounter one annoying probl...
Wilda asked 4/9, 2009 at 8:15
4
Solved
So I've created my own text pane class (extending JTextPane) and I'm using the method below to add text to it. However, the pane needs to be editable for it to add the text, but this allows a user ...
2
Solved
I'm trying to resize the height of the dialog box (JOptionPane) for long sentence with hyperlink.
My code is ..
public class DialogTest {
public static void main(String[] args) throws Exception {...
Cetane asked 27/2, 2014 at 15:28
2
Solved
Unlike JTextArea, JTextPane has no option to turn line wrapping off. I found one solution to turning off line wrapping in JTextPanes, but it seems too verbose for such a simple problem. Is there a ...
1
I have the following issue with an app of mine, a basic IRC tool, which adds messages to a "JTextPane" with using "HTMLEditorKit" as an output GUI. I noticed, that randomly but over time, my app wa...
Never asked 5/7, 2017 at 20:9
5
Solved
I would like to have a JTextPane that have scroll bar, how can I do so ? Thanks.
1
Solved
I was wondering if there is a way to ignore the text style changes in a JTextPane while using Swing's UndoManager?
2
Solved
Question :
I'm try to create an check-box in Java that contains in the text an hyper-link.
But, I couldn't make the link clickable, and only the link, not the whole text.
Here my sample code :...
2
Solved
I'm working on an application in Java which, among other things, is supposed to display the details of a Magic: The Gathering card in a text field (since I'm using Swing, this is currently a JTextP...
5
Solved
I am trying to create simple IDE and coloring my JTextPane based on
Strings (" ")
Comments (// and /* */)
Keywords (public, int ...)
Numbers (integers like 69 and floats like 1.5)
The way i col...
Carmarthenshire asked 8/7, 2015 at 17:14
3
Solved
When you setContentType("text/html") it is applied only for the text that is set via JTextPane.setText(). All other text, that is put to the JTextPane via styles is "immune" to content type.
Here ...
1
Solved
I'm working on a Java application with Swing-based GUI. The application uses JTextPane to output log messages as follows: 1) truncate existing text to keep total text size under the limit; 2) appen...
Merrimerriam asked 17/6, 2015 at 21:49
2
Solved
I hope some one can help me, this is what I want to do.
I have a JTextPane and I want to take a screenshot to that specific JTextPane coordinates and size, so far I can do a screenshot with the si...
Jameson asked 13/6, 2015 at 3:11
3
Solved
Basically, I have a JTextPane to hold some text which I wish to style. JTextArea would have been better for me to use but I'm told you cannot style the text in these?
However, the JTextPane doesn'...
3
Can anybody help me with simple log, I have to add at first line on JTextPane log messages with chosen color ( green ok, red failure ). How to achieve this ?
1
Solved
I can parse the content of a JTextPane witout any problems in HTML:
textPane = new JTextPane();
textPane.setContentType("text/html");
textPane.setText(<b>Hello!</b>);
// ...
setVisible...
Gloriane asked 16/12, 2014 at 19:41
5
Solved
I'm using a JTextPane to display some HTML that contains a table with a border. I want it to have a simple 1 pixel border.
I tried using style="border: 1px solid; border-collapse:collapse". This w...
4
Solved
I have a JTextPane which is populated by reading from a file, after which the data is parsed and formatted. The user is not allowed to edit the JTextPane, but I want them to be able to navigate in ...
3
Solved
I'm making an application with java that has a JTextPane. I want to be able to execute some code when the enter key is pressed (or when the user goes to the next line). I've looked on the web and n...
Malefactor asked 16/9, 2011 at 1:38
1
Solved
I am making a text-based game where the user inputs text to solve the game. I decided to use java swing to display the text, and I want to have the background of the textPane to be black. I have tr...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.