![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e976. Enabling Text-Dragging on a JTextComponentWith text-dragging enabled, the user can select some text and drag the selected text to another part of the text component (or to another text component). During dragging, the text component's caret follows the cursor (but caret events are not fired). When the user releases the mouse, the selected text is deleted and inserted into the location of the caret. If the control key is pressed at the time the mouse button is released, the selected text is instead copied to the new location.JTextComponent textComp = new JTextArea(); textComp.setDragEnabled(true);
e969. Retrieving All the Text from a JTextComponent Efficiently e970. Modifying Text in a JTextComponent e971. Asynchronously Reading the Contents of a Visible JTextComponent e972. Finding Word Boundaries in a JTextComponent e973. Retrieving the Visible Lines in a JTextComponent e974. Using a Position in a JTextComponent e975. Limiting the Capacity of a JTextComponent e977. Sharing a Document Between JTextComponents e978. Enumerating All the Views in a JTextComponent
© 2002 Addison-Wesley. |