I have a long Stringone that I want to display in JTextField. If Stringtoo long, it shows the right side String, not the left side, even if I usesetHorizontalAlignment(JTextField.LEFT)
For example, if my example is String "JTextField, this text is too long , it should display as ...
|----------------------|
| JTextField example ..|
|----------------------|
but instead, it appears as ...
|----------------------|
| this text is too long|
|----------------------|
Can someone suggest how this can be fixed.
source
share