carlospq
asked on
Cursor Position or Text Position
Hello everybody in Expert.
I have a jList, and when i select one item, i want it to be showed in a JTextField... no problem with that...
The problem is that when the length of text in the Jlist is bigger than the length of the JtextField that is visible, then it shows the end of the text...
I know it is not very clear... maybe i can make it clearer with a diagram:
Imagine this is the Jlist:
-------------------------- ---------- ---------- ---
| Text of first item of the List |
| Text of second item of the List |
| Another text of an item of the List |
| Text of 4 item of the List |
| |
-------------------------- ---------- ---------- ---
And this is the JtextField:
----------------------
| |
----------------------
Then when i make a click on one item (for example the second), i show it on the JtextField. But it appears like this:
----------------------
|d item of the List|
----------------------
Instead of like i would like to: (i would like to see the first part)
----------------------
|Text of second it|
----------------------
Anybody could help me??
Thank you a lot.
I have a jList, and when i select one item, i want it to be showed in a JTextField... no problem with that...
The problem is that when the length of text in the Jlist is bigger than the length of the JtextField that is visible, then it shows the end of the text...
I know it is not very clear... maybe i can make it clearer with a diagram:
Imagine this is the Jlist:
--------------------------
| Text of first item of the List |
| Text of second item of the List |
| Another text of an item of the List |
| Text of 4 item of the List |
| |
--------------------------
And this is the JtextField:
----------------------
| |
----------------------
Then when i make a click on one item (for example the second), i show it on the JtextField. But it appears like this:
----------------------
|d item of the List|
----------------------
Instead of like i would like to: (i would like to see the first part)
----------------------
|Text of second it|
----------------------
Anybody could help me??
Thank you a lot.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to be of help. :-)
ASKER
Thank you a lot!
Ive must been blind (and silly)... but ive been looking for a method that makes it during two hours, and i havent found it!
I was so frustrated that i decided to ask the question and give 250 points for that!
Thank you again!