Mouse « Text Input « Java Swing Q&A





1. Changing the cursor for hovering over hyperlinks when JEditor.setEditable() is called    stackoverflow.com

I have a JTextPane containing hyperlinks. When it's editable, hyperlinks aren't clickable, and the cursor does not change state when hovering over them (e.g. to a hand). When it is not ...

2. obtaining mouse pointer position within a document    coderanch.com

Hello, I'm trying to find out how to obtain mouse pointer position within a document and then translate it to line and character number. This functionality exists in many applications, i.e. JBuilder or TextPad. I've been searching Java API for a solution, but I haven't found one yet. Any ideas? Thanks! Kamilla

3. How to get the char index under the mouse cursor in a JTextComponent?    coderanch.com

Hi! I created an editor where the user is able to put some properties in the text. Some portions of text have some properties, some don't. I wish to display the available text properties when the mouse cursor hovers over the text. To to that, I need to know what is the char index under the mouse cursor. How can I ...

4. How can I add mouse click to inputMap of JFormattedTextField    coderanch.com

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - ...

5. removing mouse selection support from JFormattedTextField    forums.oracle.com

Hi. First a little background info: I have created a class DateField that extends JFormattedTextField. This class will eventually act as the Editor component in an editable JComboBox. Upon creation of an instance, a pattern should be passed as a String argument to the constructor. E.g. yyyy-MM-dd. This pattern is presented as default to the user using super.setText(pattern); The caret color ...