CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2009
    Posts
    1

    display beginning of the text in a Jtextbox.

    Hi,

    I hava a Jtextbox in my application. The textbox can show only 10 characters (due to the size of the textbox), but it can accept upto 40 characters. If i fetch the data from a DB and try to display in the textbox, only the last 10 character are visible. pls help me to make the first 10 characters to visible.

    let me know if more details are needed.

  2. #2
    Join Date
    Apr 2007
    Posts
    442

    Re: display beginning of the text in a Jtextbox.

    Simplest way is to set the caret position, aftr you have inserted the text to the component.

    yourTextField.setCaretPosition(0); Sets cursor to the beginning of the text.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured