jtextcomponent
Deactivate ScrollOnExpand on JScrollPane
I want to prevent the scrollpane from scrolling when the content in its view expands. Any pointers? I\'ve tried Googling variations on the title, as well as reading all the docs for JScrollPane, and I[详细]
2023-04-04 02:11 分类:问答Using Actions with DocumentListener
I\'m developing an application where I want something to be triggered both by the user updating the contents of a JTextArea, or manually via pressing a JButton.[详细]
2023-04-02 18:40 分类:问答Overwriting getText of JTextField
I wish to overwrite getText() so that it can return a null value instead of a a blank value. I noticed that getText() is a part of JTextComponent and I\'ve been unable to successfully overwrite it. Wh[详细]
2023-03-30 03:33 分类:问答Better choice: TextLayout or JTextComponent for an "ellipse with editable text" component?
If you\'ve ever used Visio or a UML class diagram editor, you have an idea of what I\'m trying to accomplish: Within a JFrame, users can add ellipses that enclose a small editable text field. These el[详细]
2023-03-13 06:56 分类:问答Getting the current offset in the HTMLDocument of a JTextComponent
In a Swing application I\'m using a JTextPane with an HTMLDocument backend. At one point I\'m inserting some sort of placeholders programmatically into the document with[详细]
2023-02-06 08:50 分类:问答JScrollBar Vertical/Horizontal setting problem- Java Swing
I am just trying to add a vertical scroll bar to my TextField and TextArea. I am using a ScrollPane and it should createavertical/horizontal scroll bar by default.[详细]
2023-01-29 23:56 分类:问答How to change print params when using new java 1.6 JTextComponent print()
I have a JTextComponent (JTextArea). I am trying to print its contents with using the new 1.6 .print() functionality. This is working well. I am also doing this in a headless/non-interactive mode usin[详细]
2023-01-29 00:54 分类:问答Smart JScrollPane autoscrolling
I am attempting to implmement smart autoscrolling on a JScrollPane containing a JTextPane. The JTextPane is used for logging my app in color. However I\'m running into a wall trying to do smart autosc[详细]
2023-01-10 10:49 分类:问答Getting an action after text is pasted into a JTextComponent (Java)
This really puzzles me. I have a JTextComponent for which I\'ve added a right-click cut\\copy\\paste menu using a JPopupMenu and DefaultEditorKit.Cut\\Copy\\PasteAction().[详细]
2023-01-01 19:18 分类:问答How can I output only a certain number of digits after a decimal place in a JTextComponent?
I am using both JLabels and JTextFields, and need to be able to truncate my doubles to two decimal places when they are displayed by the application.[详细]
2022-12-24 23:55 分类:问答