How do I set the scroll position to the bottom of window

Hi!
I have some text that is printed out to a JTextArea, which in turn is placed in a JScrollPane and the text output works fine.
However, as each line is "appended" to the JTextArea the scroll bar stays at the top meaning the text "disappears" at the bottom of the screen.
I would like to set the scroll bar at the bottom of the scrollpane after each append, but can't for the life of me figure out how. I've done it before o.o, any help would be greatly appreciated.
Thank you,
/SweDev

Something like:
textArea.setCaretPosition(textArea.getDocument().getLength());

Similar Messages

  • How do I set the placementID of portlet at runtime?

    Hi,
    I want to know the position of portlets on the page.
    Below is my requirement,
    I have 2 column layout on my page and each column has 3 different portlets. So when the first time it loads page load the page user see some portlets on each column, when user revisit that page I have to change the position of portlets in short I can say I have to shuffle the portlets at run time.
    Approach which I have decided and in which I require more help is like,
    Whenever user visit the page Backing file which run and it is store positions of portlets I am able to get position of portlet using following code,
    portletbc = deskbc.getPortletBackingContextRecursive("PORTLET_INSTANCE");
    String placeID = portletbc.getPlacementId();
    This I store in DB so whenever user revisit or refresh the page from the backing file I read the DB and if placementID of the portlet is same then I shuffle placementID. So here comes the problem or I require help...
    How do I set the placementID as I am not able to find out way to do it. So, can you please let me know how to set portlets placementID.
    Thanks in advance.
    HJ

    Check out the movePortlet method on PortalCustomizationManager:
    [http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/javadoc/com/bea/netuix/application/manager/persistence/PortalCustomizationManager.html]

  • How can I set the data binding between Web Dynpro & Database table

    Dear friend,
    I am a beginner of Web Dynpro. I want to develop my simple project like these:
    1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
    2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
    For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
    1. How can I set the data binding between Web Dynpro and Database table ?
    2.  Are there any nescessary steps that I will concern for this case?
    Sorry if my question is simple, I had try  to find solution myself, but it not found
    Thanks in advances,
    SeMs

    Hi,
    You can write your own connection class for establishing the connection with DB.
    Ex:
    public class  ConnectionClass {
    static Connection con = null;
    public static Connection getConnection() {
    try{
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
    con = ds.getConnection();
    return con;
    }catch(Exception e){
    return null;
    You can place the above class file in src folder and you can use this class in webdynpro.
    You can have another UserInfo class for reading and writing the data into the DB .
    Regards, Anilkumar
    PS : Refer
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
    Message was edited by: Anilkumar Vippagunta

  • How can I set the United States as my country when opening PSE 10?

    How can I set the United States as my country when opening PSE 10 so I don't have to scroll down every time?

    Why do you have to scroll down every time? You should only see the country window the very first time you launch PSE after installing it.

  • How do i set the size of 3d picture control

    dear sir,
                I have attached my vi.I have one doubt  ie I have used translate object. vi in my vi to move my picture according to the value set by the y position.This y position indicates depth my object.this is sample object  insteat of i am going to update my underwater vehicle.
    What my problem is when i chnage the y value beyond 200 I can not see my picture.so  how do i set the size of the 3d picture control size.
           I have to see my picture within the 3d picture control eventhough i change the y value between 0-500,how do i solve my problem.
    Another my doubt is how do i show the depth value (ie y value in translate object .vi) in 3d picture control ie while the picture is moving in a 3d picture control at the same time i want to display the corresponding depth rating in the 3d picture control
    Pls anyone suggest me as soon as possible.
    Thanks and regards
    jayanthi.k
    Attachments:
    Untitled 1.llb ‏67 KB

    Jayanth,
    Take a look at the attached example.  Alternatively, you can search for it in NI Example Finder by going to Help>>Find Examples in LabVIEW, click on the search tab, and search for meshes.  I had difficulty reading your code, but I believe you need to position your lighting source in the optimal location to get better definition.  And the example shows how to bind a color to the object.
    Trey B
    Applications Engineering
    National Instruments
    Attachments:
    Using Meshes.vi ‏76 KB

  • How do I set the bleed in the gutter for full spread pics?

    I am so confused!!
    How do I set the bleed in the gutter so that I lose as little as possible in an image that bleeds across the full spread?
    I have 75 double page images (full spread) that need to be set so they lose as little as possible when printed into a 350 page book.
    The printer has asked for a 3mm bleed. Do I place the photo to the edge of the bleed and just accept that i will lose lots or is there another way?
    Thanks.

    rob day wrote:
    In the case of crossovers there's nothing that a script or the secrets technique will help. If you include inside bleeds in your ID doc and then use the document bleeds during export, crossovers will include an inside bleed like this:
    http://www.zenodesign.com/scripts/xoverbleed.png
    Which is exactly what I said in my second post. The link to the other technique was for instructional purposes in case there was a situation where there was an element bleeding to the spine that did not cross over.
    If you feel compelled to start manually accounting for creep in the document rather than letting it be handled in imposition, you'll run into real problems. The amount of creep needed varies depending on the position of the image on the signature, the weight of the paper and the number of pages in the signature—if the crossover is in the center of the sig there's no creep, while on the outside it's at the max.
    Couldn't agree more.

  • HT4356 My Ipad prints to my airprinter that works OK but how do I set picture size/position etc

    My Ipad prints to my airprinter that works OK but how do I set picture size/position etc. At the moment from the photos app it prints an A6 photo in top left corner. How do I change that to something different.

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico, Spanish is my native tongue. I do not speak English very well, however, I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    If you put photo paper in the printer it will print correctly on the paper. Also, some photo printers will adjust the size photo printed when you put different size photo paper in the tray.

  • How do I set the thumbnail image of my videos that export to my computer?  I'm using Premiere Elements 11 on a windows 8.1 PC 64bit.

    How do I set the thumbnail image of my videos that export to my computer?  I'm using Premiere Elements 11 on a windows 8.1 PC 64bit.
    Or how does Premiere 11 determine where to set the image for the video it is exporting? 
    I already know how to use Freeze frame and save the image to my computer by Publish+Share/Computer/ Immage.
    Thanks,
    Mike

    Mike
    This is not Adobe. Rather user to user. We are all visitors here.
    Just a bit of history....back in the days of Premiere Elements 4, you could set a "poster frame" in what was called the Project area. You did this by right clicking a blank area there and, from the drop down menu that appeared, selecting View/Preview Area, and using the poster frame feature there.
    As I said, when a video imports into Premiere Elements, the thumbnail of the import has been presenting as the first frame of the video. With this Preview area "poster frame" option, you could set the video's thumbnail in the Project area so that the first frame was another frame in the video. But, this "perk" was restricted to thumbnails of the video in Project area.
    If you exported to file with the first frame modified video, the export's thumbnail in Windows Explorer would present with other than the real first frame or the poster frame as the first frame.
    Also, in more recent versions, I have observed that the export to file does not display the real first frame of the video in Windows Explorer. Seems random, but I have not kept track.
    And, remember, at the onset I wrote
    As far as I have ever seen, Premiere Elements Windows uses the first frame of the video for its thumbnail in the program.
    I know of no way within Premiere Elements to control what the program opts to do in this matter. In some compatibility
    issues, it opts to give no image but a generic one.
    I did not say that you can expect to have the Premiere Elements' export file's thumbnail in Windows displaying with its real first frame. And, the more you get into this, depending on the versions, more details need to be added to my comment about "...first frame of video for its thumbnail in the program..."
    I would have to look into all this further to get perspective on the contributing factors.
    ATR
    Add On...The Poster Frame feature appeared in versions 4, 7, 8, and 9 by my count.

  • How do you set the time period on IMAP email accounts (razr maxx)

    Hi Guys -
    Does anyone know how you can set the time period that the stock email will keep the already downloaded messages for IMAP email accounts?
    Mine never seems to show more than a couple of days worth at a time. I'd ideally like to be able to see at least 2 weeks worth of messages without needing to download them again!
    On other phones I've had there was a setting in the menu, but either I can't find it...or it's not there. I've found the setting for how OFTEN it checks the accounts, but not the setting I am seeking.
    Your help is appreciated!
    Best Wishes for the Holiday Season.
    -Rich

    Hey Rich.  Once in 'settings,' there should be a "days to sync' under the 'data usage' section.   You don't have that?

  • How i can set the selected item of a dropDown component from java code

    Hi
    Thank you for reading my post
    How i can set the slected item of a DropDown component from backing beans java code ?
    it is binded with a database , so one field determine its display and one other field determine its value , I want to set the selected item of this combobox
    In back code i have both value and display values to use them .
    can some one give me some help ?
    Thanks ,

    See code sample 3 at http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    See also, the selection components row in the table under http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    It says
    One way to preselect items is to call setSelectedValue(Object[]) or setSelectedValue(Object) from the prerender() method. You pass in the return values of the items that you want preselected. Be sure to verify that getSelected() returns null before setting the default options, or you will overwrite the user's selections on a post-back.

  • How can i set the alternating colors for a table rows

    Dear All,
    Please any one help me how can i set the Alternating colors for Table Rows.
    i created a theam there i set the background alternating color to brown and i set the table design properity to alternating. but it is not reflecting.

    Hi,
    The design property in Table properties should work for your requirement. Select "alternating" value for design.
    Please see the API below:
    design
    Determines the appearance of the table. The property design can take the following values and is represented by enumeration type WDTableDesign.
    alternating - The table rows are displayed alternately in a different color.
    standard - The table background has one color. The individual table rows are displayed with grid net lines.
    transparent - The table background is transparent. The individual table rows are displayed without grid net lines.
    Check whether you have changed the right property or not? Also table should contain more than one rows to test this scenario.
    Regards,
    Jaya.
    Edited by: VJR on Jun 17, 2009 6:43 PM

  • How can I set the page that will open, when I open a new tab, to be the same as the homepage?

    How can I set the page that will open, when I open a new tab, to be the same as the homepage?
    An app changed it to some other search engine, before installing the app, I the tab that would open was the homepage I set.
    In my case it is Google, and I want my new tabs to open on Google like they did before the installation.
    thank you,
    Asaf Privman.

    You can middle-click or Ctrl left-click the Home button on the Navigation toolbar to open the Home page in a new tab.
    You can look at one of these extensions:
    * NewTabURL : https://addons.mozilla.org/firefox/addon/newtaburl/
    * New Tab Homepage : https://addons.mozilla.org/firefox/addon/new-tab-homepage/

  • How do I set the audience when I'm using Siri on my iPhone 5 to post to Facebook

    How do I set the audience privacy for when I’m using Siri on my iPhone 5 to post to Facebook?
    When I ask Siri to post a message to my Facebook Siri tells me what I have said and then asks tot post it, I then checked on my computer and the post is visible to "ME ONLY" I can change this on the computer and on my phone via the App but I do not want to be doing that all the time.
    If I post to Facebook via Siri on my iPhone 5 I want it at the default setting of friends only.
    So How do I change this?
    I posted the first one 2 minutes ago then went into Facebook via the App and changed it but did a second one hoping that the default privacy had changed but it was again to me only. As you can see via the padlock. Please help. Thanks

    What if you do need help or emergency situation while Posting FB via Siri is the fastest way to show you or someone is in danger, and he/she is dying because the post is Only visible to Me !?!?!?!???
    Anyone who uses FaceBook to get immediate help for life threatening emergency is mercifully removing themselves from the gene pool.

  • How do I set the "reply to" field in the iPad 2 Mail app?  I use an email forwarding service (not an actual email account) that I would like people to reply to.

    How do I set the "reply to" field in the iPad 2 Mail app?  I use an email forwarding service (not an actual email account) that I would like people to reply to, so setting up an account with the correct reply-to address doesn't work because there's no associated outgoing mail server.  I had this working under iOS4 but it seems to have disappeared when I upgraded to iOS5.

    Welcome to the forum, NicoleYM. I don't think the Touch Mail has as many options as the Mac Mail app. However, you could set a standard signature. Go to Settings > Mail, Contacts, Calendars > Signature. There you can type a reply address and hope people see it.
    Alternatively, you can go to your GMail account in your web browser and click on Settings > Forwarding and POP/IMAP. There you will have an option to forward all emails (or only some, if you set up a filter) to your other address.
    Good luck!

  • How do I set the iPhone 4s to answer in 5 rings?

    How do I set the iPhone 4s to answer in 5 rings?

    You would have to contact your carrier about the time before voicemail.

  • How do I set the imac to go to sleep after 5 min of in activity?

    how do I set the imac to go to sleep after 5 min of in activity?

    Hi.
    Try do the following: Go to "Settings" > "Energi" (or what it's called in the english settings). From here you can adjust your settings.
    Hope this was helpful.

Maybe you are looking for

  • Check on quantity field of co11n

    hi all,     I want to display error messages when the quantity field at goods movement level of transaction co11n is 0 or space. Find me the user exit or badi , but field exit is becoming complex as the screen is a table control. help me.

  • Problem in session

    hi i have been facing pbm in retrieving session values in Resin web server i m using the following code for creating session in the login page id = "12345"; name = "abc"; session.setAttribute("session_id",id); session.setAttribute("session_name",name

  • Macbook Air blown speaker

    I bought a Macbook Air 13 inch recently, the best one in store, costing £1,349.00. When I took it home and got a few songs from my iCloud account on iTunes, I noticed a deffinate crackle coming from the left speaker. I took the macbook back to the Ap

  • School assignment

    hey, i need help with my assignment. in this assignment i need to be able to use ArrayLists, and im having trouble with that. the plan is to load student information into a data base and save it in the arraylist. i think is done by using a temporary

  • Wireless setting up Photosmart C310 series to Belkin Play usb wireless adaptor.

    I am strugling to set up my printer to the Belking  adaptor. The printout shows that the SSID failed. Anyone able to help me please ? This question was solved. View Solution.