1

I have a JTextField with a text and I want to keep the functionality, edit/select/erase the contained Text.

But, when the Mouse is hover the JTextField I want the Scroll the Text if visualization width is lower than the contained text (in pixel/dot terms).

I know the jTextField1.setCaretPosition(SomeInteger); But I don't want to show the Caret and blinking cursor (or similar) and the Scroll Text is made by character.

I don't have a code to show because I don't know what to do with JTextField Component later is instanced (I don't know where to begin).

The first step is made changes (visualization by pixel/dot) manually later implement Thread/Timer method.

I was viewing this method https://www.youtube.com/watch?v=HKX2sAQL13g, But I think is not appropriated for my requirements.

I see this: Marquee effect in Java Swing But, the changes is made by characters and JLabel based on.

Another example is located here: http://www.java2s.com/Code/Java/Threads/Swingandthreadsscrolltext.htm

Is it posible to establish the Text show in runtime the JTextField. (unselect text method)?

Is it posible to do it by pixel or dot?

Chepe Questn
  • 562
  • 3
  • 13
  • I would consider a different approach, perhaps making use of the tooltip property – MadProgrammer Jul 20 '17 at 00:47
  • Is not effect I'm needing. Maybe a overlaid image. – Chepe Questn Jul 20 '17 at 01:49
  • Perhaps you should have a look at [How to Decorate Components with the JLayer Class](http://docs.oracle.com/javase/tutorial/uiswing/misc/jlayer.html), that might be able to allow the control you need without having to subclass the text field – MadProgrammer Jul 20 '17 at 01:53

0 Answers0