Scrolling to the bootom of document

Hi,
It is a loing time.
i find some thing very interesting concerning the scrollinpane problem with document. y code is this
document = new DefaultStyledDocument();
textArea = new JTextPane(document);
textArea.setFont(new Font("Serif", Font.PLAIN, 13));
textArea.setEditable(true);
JScrollPane areaScrollPanea = new JScrollPane(textArea);
i made a chat so i expect that the last post should be at the bottom of the scrollpane.
I find that it is not amway the case. If i insert line like
document.insertString(document.getLength(), toto+"\n", attrs);
inise a thread the scroll lost the last line and stop moving donw.
But i find out that if you clik with the mouse inside the document wich is inside the scrollpane "of course you need to set textArea.setEditable(true);"
everything start again normally.
but i do not know how to do it automaticly.
i just want to put the last line visible.
regards
Herve

thank you it is fine with this
document.insertString(....)
textPane.setCaretPosition( textPane.getDocument().getLength() );

Similar Messages

  • Acrobat Pro 9.0 freezes when viewing/scrolling through the table of contents of a document

    I am hoping someone can help me or has experienced the same problem I'm about to describe. I belong to the technical publications group of a fairly large company and I review a lot of PDF documents. I just installed Acrobat 9.0.0 (via CS4 Design Standard) and I've noticed on larger documents where there's a full page or several pages worth of Table of Contents, Acrobat 9.0.0 seems to freeze up when I begin scrolling through the TOC. For example, if I want to use the Text Edit tools or use a sticky note, when I press on an icon, Acrobat will freeze for a good 10 seconds, then will allow you to press the icon. It tends to freeze each time I want to make my next edit or even pressing the up/down arrow buttons to go to the next page. Once I get through the TOC pages, Acrobat seems to function normally--no freezes.
    Has anyone experienced this? Would appreciate any kind of advice on how to fix--perhaps there's a patch or update?
    I didn't experience any of this using Acrobat 8.0--I never had any real problems with Acrobat until 9.0.0.

    Your issue may not be related to a difference between v8 and 9.
    I have not had this problem on my computers, but a coworker had this issue. For many documents that others were able to open and scroll through without issue, his computer was freezing and unfreezing.  IT determined his graphics capabilities were not able to keep up with the requirements of working with larger documents and gave his computer a RAM upgrade and a new graphics card. Particularly during scrolling, higher demands are made on the computer to graphically render and re-render page content. Documents giving him problems before became a non-issue.
    A new graphics card is obviously a $$$ solution, but you might want to check to see if your RAM meets the minimum requirements and check to see if there are any program updates (Help > Check for Updates).
    I have had an issue of pdfs freezing, but not specifically in the table of contents areas. If your document has pages with images that have an unusually high number of layers, it may affect the ability to work effectively in the document.

  • HT2476 apps preview was hang when scroll thru the pdf documents

    I have upgraded my mbpro to mountain lion but application "preview" was hang when scroll thru the pdf documents. can somebody help me with solutions?

    From the Safari menu bar, select
              Help ▹ Installed Plug-ins
    Besides the following, what plugins are listed?
              iPhotoPhotocast
              Java
              QuickTime
              Shockwave Flash
              WebKit built-in PDF (absent in OS X 10.9 and later)

  • My cursor keeps moving and everything scrolls to the bottom of the page or document

    My cursor sometimes starts moving and my documents and web pages scroll to the bottom. I have to restart the iMac to reset it. It works fine for a while, then comes back. Anyone seen this before? Is there some setting being changed?
    It has happened about 5 times so far in the last month.
    Any ideas.Thanks.

    Do both a Intel iMac SMC and PRAM resets at least 2x each, then repost after you have thoroughly tested.

  • Ok.  I'm stumped.  The right side scroll bar on my pages documents disappears sometimes.  I don't know how to restore that function.  If I widen the page field, it will appear for a short time.  Very annoying if I am just using trackpad.  What to do?

    Ok.  I'm stumped.  The right side scrool bar on Pages documents disappears sometimes.  I have no idea why. Nor do I know how to get it back.  I've tried closing and reopening and restarting my macbook pro.  If I widen the right side, I get the scroll bar for just a few seconds and then if fades away.  I can't find anything it the help menus that fits it.

    geek,
    The scroll bar is consistent with the Full Screen approach in trying to maximize the working area of your screen. The scroll bar fades to make room for data. So, use your 2-fingered scroll or arrow keys for short moves. If you have a long way to scroll, the scroll bar will activate any time you scroll with the trackpad or the arrow keys and you can grab it and pull it to your desired position in the document.
    One man's innovative is another man's irritant, I suppose.
    Jerry

  • Is there a way to place an encrypted document on the iPhone, a document that contains passwords and private information, really well protected from hackers?

    Is there a way to place an encrypted document on the iPhone, a document that contains passwords and private information, really well protected from hackers?
    Can such a document be exempted from the cloud feature, a feature that I use for the rest of my stuff?
    If so, how can I do this?

    Yeah, but 1Password charges for both the iPhone client AND the Mac/Windows client, and it ain't cheap! Plus, it only syncs via Dropbox, and where I work Dropbox is banned due to security concerns.
    Sure, there is Secure Notes, a free form entry part of 1Password, but a bug in the program will not let you view all the text you can put in the field!! You have to EDIT the text to see the whole list! What if you accidentally delete or change an entry while scrolling through your entries??
    Plus NONE of the programs I have tried, and I have tried a lot, can find text IN the file - do a search and it will tell you what file/folder the text is in, but YOU have to scroll down through 400 entries one at a time looking for the entry.
    I use a program called Secure Text - I have many admin passwords, and DO not need a field based program. Secure Text is totally freeform entry. However, it suffers from the same search issue.
    If someone knows of a secure text program that uses a file/folder type of layout, free form entry, AND can actually tell you where in the file/folder the text you searched for is, PLEASE let me know! Plus sycing via some method other than Dropbox would be a plus.
    Before I got my iPhone, I used a program called Tombo for my WinCE based system AND my Windows workstation, and the synced up fine without iTunes, internet, DropBox type functionality or any of that horsecoller stuff Apple likes to throw on your neck.

  • Text Starts Scrolling down the page when i type

    Im a law student and take an extensive amount of notes in class on my laptop. I tried switching from MS word to Pages, but intermittently run into problems that have caused me to stop using pages. Ill be typing, and all of the sudden my notes will start scrolling down the screen rapidly. ill look up a few pages and ill see it inserted a HUGE gap between the first word i typed and the second, usually about a page. My notes instantly turn from ~14 pages to~20+ every time i type an additional letter. I try closing the document, reopening it, no luck. I can then not use that file any longer, and start a new one. One the new one, same thing, after about 1-3 pages of typed notes, it starts scrolling down the page again. any ideas?? i really want to use pages, but can't until it stops this nonsense. thanks in advance

    Is this a blank page on which this occurs, or has it been formatted with vertical numbering? I use Pages extensively and have never run into such a thing. It almost seems like a sticky 'return' key. If there is some other formatting, there may be an 'image wrap' occurring that would make it jump beyond the image to the next page.
    It's a curious dilemma.

  • Catching scroll-down Event of PDF Document in Browser

    Hi Experts,
    We have a BSP Application where we have a flag confirming that the user has accepted our terms and condistions (T&C). There is a link where T&C can be displayed as pdf within a new browser window. Our Business people require to ensure that the user has read the entire document. That means that the user must scroll down the entire PDF until end. After scrolling till the end, the (accept)-flag can be selected. As the T&C are in a new browser windwo we have to catch the scroll down event from pdf (till end of document) and get back to the calling application providing wherther the user scrolled down till the end or not. If yes the accept flag can be selected and user can proceed to the next registration level.
    Do any body knows how to meet this requirement?
    Thank you
    Musti

    Hi Mustapha,
    This can acheived by using Form Fields....by caputring the values after an event is triggered.
    Below is the sample code..
    data:
    lt_fields     TYPE     TIHTTPNVP
      ls_fields  LIKE LINE OF lt_fields,
    case event->id.
    when 'click'
        CALL METHOD request->get_form_fields
          CHANGING
            fields = lt_fields.
    LOOP AT lt_fields INTO ls_fields WHERE name CS 'XXX'
                                                             AND  name CS 'XX'.
    ................Logic.................
    ................Logic.................
    ................Logic.................
    endloop.
    endcase.
    hope this is helpful.let me know if you have any concern.
    Thanks
    kalyan

  • When sending a pdf as an attachment I cannot scroll through the pdf.  Nor can I look at Outlook 2010

    Frequently I create a pdf and then I want to send it.  After clicking send and the email pops up I compose the message.  However, as I compose it, I have a question requiring me to look at the pdf.  However, I can't page through the document because it's locked by Outlook.  Also, I can't look at other emails while this message is open.
    A workaroud is to save the document in Outlook.  Then I can scroll through the pdf or view other emails but I have to go to the drafts folder and reopen the email to edit it.
    What I'd really like to see is a way to set the default when sending a pdf in Outlook to have it always send a copy.  That way the pdf isn't locked and I don't have to go throught this workaround.  I encounter this every day.  Isn't there some solution to this?

    Edit>Preferences>Email accounts>List of email accounts. Click the drop-down that says "add account" and select Gmail. After adding it, you can go to the account area and change it to default.

  • My touchpad will not scroll with the current version of foxfire.

    The screen in foxfire will not scroll with the sliding of my finger on right side of the touchpad on my lenovo thinkpad or the navigation button. It does work with all other programs including windows explorer and google chrome.

    OK, this is the original poster again. The trackpad scrolling problem has been sporadic. Now I have realized that I have this problem (in Firefox 7.0 and 7.01) WHEN THERE IS A PDF DOCUMENT OPEN IN ONE OF THE TABS. When there is a .pdf open, trackpad scrolling works fine in *that* tab but not in any of the other Firefox tabs that are open. When I close or move away from the .pdf file, then the scrolling function returns in the other tabs. Is there something about the Acrobat plug-in (ver. 9.4.5) that isn't working correctly in Firefox 7.x?

  • TS5362 My scroller on the right hand side of my screen is missing and I have to use my arrow buttons to navigate through the page with my update. Please help:-)

    Since my update, I cannot scroll using the scroller option that slides down the page and my iTune downloaded podcasts will not sync to my apple tv. Any ideas?

    Hello there, breezyandrade.
    The following Knowledge Base article offers up some great information on setting your scroll bar preferences. Although written for Mountain Lion it provides accurate location for this preference in Mavericks as well:
    OS X Mountain Lion: Change how scroll bars work
    http://support.apple.com/kb/PH10895
    Use General Preferences to customize scroll bars in windows.
    Choose Apple menu > System Preferences, and then click General.
    Set the scrolling options. For more information about the scrolling options, click the Help button.
    Some apps let you scroll through a document in other ways, such as by dragging in the document, using arrow keys, or pressing the Space bar.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Scrolling To The Bottom of a WebView

    I'm trying to figure out how to determine when the user has either scrolled to the bottom or the top of a web view. There doesn't seem to be a way to get the current scroll position within the webview. The ScrollEvent only shows the current delta, and there doesn't seem to be a way to determine how much of the document is not visible (clipped).
    Mark

    OK. My hack for this is ugly but it works:
    WebView view...
    Set<Node> nodes = view.lookupAll(".scroll-bar");
                    for (Node node : nodes) {
                        if (ScrollBar.class.isInstance(node)) {
                            ScrollBar scroll = (ScrollBar) node;
                            scrollPos = scroll.getValue();The view.lookupAll call is the only way to actually get a handle on the webview's scrollbars. Since there are a couple of components that actually use the scroll-bar style, you have to make sure that the node is a ScrollBar before you do anything with it.
    This shouldn't be necessary. Ideally the ScrollEvent class should give you handle on the ScrollBar, or give you the current scrolling position in relation to the max and min values. However, that doesn't seem to be the case. Prior to this, I tried putting the WebView in a ScrollPane, and a variety of other hacks, but every time I debugged through it, I would never get the right scroll position.

  • How do i get to the top of an iTunes playlist without having to scroll all the way

    when i am down at the bottom of one of my playlists and i want to get to the top i have to scroll through thousands of songs and it takes forever i was just wondering if there is an easier way to get to the top of a playlist?

    Hi Dlink123,
    To move to the top of the list, you would use the Home button as with most places on the Mac, fn-Left Arrow on a MacBook Pro.
    OS X: Keyboard shortcuts - Apple Support
    fn-Left Arrow
    Scroll to the beginning of a document (same as Home key)
    fn-Right Arrow
    Scroll to the end of a document (same as End key)
    Note you need to be in the song list so it knows what your are moving to the top of, so click on a song first if none is currently selected.
    Thank you for visiting Apple Support Communities.
    Nubz

  • Start a horizontal scroll in the middle of a table?

    Hello,
    My demanding users are at it again. Although I am learning alot but lest I digress;-) Lets say I have a tableview with 72 columns that is one month for each year spanning over 6 years. No biggie but instead of the horizontal scroll starting at the left most point I would like start the scroll in the middle (say at column 36 or something) of the tableview. So if my tableview starts at 03/2002 in column 1 and goes to 03/2008 in column 72 I want the horizontal scroll to start at 03/2005(current month)in column 36 each time the table is rendered. I am using MVC and the tableview iterator(which I love).
    I was hopeing that I could find something similar to a dropdown i.e. pre-populate a selected value and the dropdown starts at that selection not the top most one. Any one have any ideas where I could begin? I have searched this forum for 'horizontal' and 'scrolling' but no hits.
    TIA,
    Rich

    Hello!
    I gave the example from Thomas Ritter to the JS person here and he got it working. I can't take credit but I wanted to share it with the forum. Basically what happens is that the horizontal scroll will scroll to the right till the date column that is close to the current date. I say close to because some of the columns are in months so if the current date is 21-MAR-05 then the horizontal scroll will scroll right until MAR-05. Either way here is the code. As I said before I take no credit for it. I do have another question though. Anyone have any ideas how to change it so that I can pass it a date and have it scroll there instead of the current date?
    <code>function lockCol(tblID) {
         var table = document.getElementById(tblID);     
         var cTR = table.getElementsByTagName('tr');  //collection of rows
         var coords = { x: 0, y: 0 };
         var now = new Date();
         var strMonthArray = new Array(12);
         strMonthArray[0] = "Jan";
         strMonthArray[1] = "Feb";
         strMonthArray[2] = "Mar";
         strMonthArray[3] = "Apr";
         strMonthArray[4] = "May";
         strMonthArray[5] = "Jun";
         strMonthArray[6] = "Jul";
         strMonthArray[7] = "Aug";
         strMonthArray[8] = "Sep";
         strMonthArray[9] = "Oct";
         strMonthArray[10] = "Nov";
         strMonthArray[11] = "Dec";
         strMonth = strMonthArray[now.getMonth()];
         year = new String(now.getYear());
         var today = now.getDate() + "-" + strMonth + "-" + year.substr(2,2);
         if (table.rows[0].cells[0].className == '') {
              for (i = 1; i < cTR.length; i++) {
                   var tr = cTR.item(i);
                   if(i == 1){
                        tr.cells[0].className = 'firstLocked';
                        innerloop:
                        for (j = 2; j < 100 ; j++) {
                             if(compareDate(today, tr.cells[j].innerText)) {                         
                                  elt = tr.cells[j];
                                  while (elt) {
                                       coords.x += elt.offsetLeft;
                                       elt = elt.offsetParent;
                             break innerloop;
                   else{tr.cells[0].className = 'locked'}
         else {
              for (i = 1; i < cTR.length; i++){
              var tr = cTR.item(i);
              tr.cells[0].className = '';
         document.getElementById('tbl-container').scrollLeft = coords.x - 69;
    function compareDate(date1, date2){
         a = date1.split("-");
         b = date2.split("-");
         day1 = parseInt(a[0]);
         month1 = a[1];
         year1 = a[2];
         day2 = parseInt(b[0]);
         month2 = b[1];
         year2 = b[2];
         if(year1 == year2) {
              if(month1 == month2) {
                   if((day2 >= day1)) {return true;}
                   else {return false;}
              else {return false;}     
         else {return false;}
    }</code>
    Cheers,
    Rich

  • Compiled PDF (from 8MP images) lagging/flashing whites/refreshes while scrolling through the pages.

    Hi guys,
    I would like to find out how exactly to optimize the pdf file so that I don't experience the problem mentioned in the subject line.
    what i did was take pictures of a few documents (80% text, 20% images) using a Canon G12 (had similar results with a DSLR too), and compiled them into a 200page PDF, using medium quality in PDF complier.
    after that, i used Clearscan to OCR the whole thing, + cropped the white borders to make it fit nicely.
    however after saving the PDF file, scrolling through the images feels laggy, it needs to "refresh" itself every now and then, which appears as flashing whites.
    how do i prevent that?
    i'm extremely certain it's not the problem with the computer.
    i have tried with a quad core i7 sandy bridge with 16gb ram and it lags. it lags on other computers as well. however, a normal ebook with images and text scrolls through smoothly. what is it that i'm doing wrong?
    i am on Acrobat X Pro by the way.
    Thanks!

    Hi guys,
    I would like to find out how exactly to optimize the pdf file so that I don't experience the problem mentioned in the subject line.
    what i did was take pictures of a few documents (80% text, 20% images) using a Canon G12 (had similar results with a DSLR too), and compiled them into a 200page PDF, using medium quality in PDF complier.
    after that, i used Clearscan to OCR the whole thing, + cropped the white borders to make it fit nicely.
    however after saving the PDF file, scrolling through the images feels laggy, it needs to "refresh" itself every now and then, which appears as flashing whites.
    how do i prevent that?
    i'm extremely certain it's not the problem with the computer.
    i have tried with a quad core i7 sandy bridge with 16gb ram and it lags. it lags on other computers as well. however, a normal ebook with images and text scrolls through smoothly. what is it that i'm doing wrong?
    i am on Acrobat X Pro by the way.
    Thanks!

Maybe you are looking for

  • [SOLVED]Canon D1100 Series UFRII LT doesn't print, CUPS thinks it does

    Hello everyone, I have been struggling getting a network printer at work working with my laptop. I installed the driver from Canon's web site, and everything seems to be fine on my end, but the network printer doesn't print anything I give it. I can'

  • Error when using PPR in the OA page developed.

    HI, We are encountering an error when using PPR for the custom OA page being developed. I am using JDeveloper version 9.0.3.5(Build 1437) and Oracle Applications version 11.5.10.CU2. The scenario we are using PPR and the steps to reproduce the issue

  • Valuation Procedure to calculate Fair Market Value

    Hi Treasury Experts, In the Treasury Hedge Management component we are looking for a valuation procedure which can handle the calculation of the Fair Market Value of the financial transactions in line with the standard FAS133 accounting standard. We

  • Connect a printer to Bt Home Hub usb plug and acess the printer on my mac

    Hi, I have the new BT Home Hub and i connected a printer in the usb socket of the hub. Does anyone know how i can print with the printer. The printer is a HP Deskjet Series And i have a iMac

  • PREQ report

    Hi Gurus, We need to have a better way to identify who is responsible for approving requisitions that are submitted across all of the company. This will serve as an auditing report to verify that the correct people are set up and controlling the corr