Results 1 to 3 of 3
- 06-18-2008, 11:32 AM #1
Member
- Join Date
- May 2008
- Posts
- 69
- Rep Power
- 0
[SOLVED] JtextField alignments issue.......?
Hi Members,
Im using jtextField to display some description message, but when the 'message extends greater than the textfield size, it automatically gets aligned from 'Right to Left', but i need to show it from 'Left to Right' aligned.
I also tried 'JtextField.setHorizontalAlignment(JTextField.LEFT );' but it is not working when the message size is greater than textfield size.
Looking forward for your reply.
Regards,
Prabhu.
-
It makes sense for Java to behave this way, as if you are typing into the textfield and it is longer than the space allowed, you want to be able to see what you are typing in, i.e., the right side of the text.
Now I'm guessing that you're not doing that, you're not typing in information, but instead the program is sending information into the jtextfield via its setText(...) method? (hint: you will get better quality answers if you provide all the information necessary for us at the get-go). If so, you may solve this by inserting your text and then calling on your JTextField the setCaretPosition method: myTextField.setCaretPosition(0);
- 06-19-2008, 08:50 AM #3
Member
- Join Date
- May 2008
- Posts
- 69
- Rep Power
- 0
Similar Threads
-
how to focus to another JTextfield?
By birdofprey in forum AWT / SwingReplies: 2Last Post: 04-09-2008, 01:08 PM -
Using Columns With JTextField
By The Evil Genius in forum AWT / SwingReplies: 1Last Post: 03-17-2008, 01:01 AM -
Clean the content of the JTextField
By elizabeth in forum AWT / SwingReplies: 1Last Post: 07-26-2007, 08:38 PM -
help with JTextfield
By gary in forum New To JavaReplies: 4Last Post: 07-11-2007, 01:58 PM -
How to determine if the value of a JTextField is double
By nemo in forum New To JavaReplies: 1Last Post: 05-20-2007, 11:19 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks