Clearing the viewport of a JScrollPane

Please bear with me on this post; I'm having trouble explaining this.
I'm writing an application that displays text in a JTextFrame, which is attached to a JScrollPane for scrolling. The program needs to allow the user to clear the viewport, without actually deleting any text from the underlying document.
Essentially, when the user presses a button, I want the viewport to scroll past the end of the document, which would simulate the viewport being cleared. If the user then scrolled up one line, they'd see the last line of the document. Here's a little ASCII drawing to explain it a little better:
+--------+
|Data in |
|the     |
|document|
+========+
|        | <-- Empty viewport, and the next line up is the last line in
|        |     the document.
+--------+Any help would be greatly appreciated.
Thanks...

Aranor,
if i understand you correctly you are using a
JTextArea (not a JTextFrame).
to scroll to the end of the text you need to do a
textArea.setCaretPosition(lengthOfText);
thomasSorry, that was a typo. It's a JTextPane that's embedded in the JScrollPane, not a JTextFrame. And I don't need to set the carat to the end of the text, I need to scroll past it (please see above).

Similar Messages

  • While scrolling IE 11 doesn't update (on time) the position of an element inside the viewport

    Hi,
    It's essential to check the following jsFiddle demo http://jsfiddle.net/rbtbar/1dudpeox/ to see the issue.
    If you scroll the viewport, the position of the fixed element is not immediately updated, which makes a bad impression to the users. It happens only in IE. Neither Chrome nor FF got this problem.
    Regards,
    Robert

    Hello rbtbar,
    There are many web designs which don't support several web browsers. Maybe they have used un-supported script for making their web design which don't supports IE. Otherwise, if it is not, then your problem must get fixed if you reset IE settings.
    I searched alot and found some links:
    Link: https://github.com/jsfiddle/jsfiddle-issues/issues/311
    Also 
    Link: http://stackoverflow.com/questions/15260947/why-jsfiddle-is-not-rendering-at-all-in-ie8-and-previous-versions
    So we can clearly understand it is not supporting IE currently! Which means, there is
    NO fault with IE. Similarly, it may NOT work on
    IE 11 too, due to their CSS. According to your description, I can just say "IE 11 is partially supported"
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Is there a way to selectively edit a conversation in iMessages instead of clearing the entire conversation? Like you can do on the iPhone for instance.

    Is there a way to selectively edit a conversation in iMessages instead of clearing the entire conversation? Like you can do on the iPhone for instance.

    Did you find an answer to your question?
    Would it also apply to Mountain Lion's Messages?
    Thanks

  • I would like to be able to start typing a URL directly (with no need to clear the field first) after opening a new tab with my homepage...

    I've just installed the newest desktop version of the Firefox browser because my Opera doesn't feel very well these days. I'm trying to become friends with Firefox, and that's why I've changed the new tab settings in order to have my offline homepage loaded every time I open a new tab. There is an inconvenience — when I press Ctrl+T, the cursor appears at the end of the URL. It means that when I start typing, the letters show in the address bar after the URL of my homepage, so what I need is to clear the field first.
    Is there a way to get rid of this? (If it helpes, I'm currently using Windows 7.)
    I would appreciate if I could just press Ctrl+T, type a URL, and press Enter when I want to go to a website different from my homepage. Thank you for your replies!

    Then you can use (Ctrl+L and) Ctrl+A to select all the text in the location bar or Shift+Home/End.

  • I can not view ANY videos on Vimeo, I have 'reset' the Ipad, original IOS 5, cleared the history and cookies, I have changed the DNS number to 8.8.8.8, I have worked on this for 2 days and still can't find a fix, HELP!!

    I can not view ANY videos on Vimeo, I have 'reset' the Ipad, original IOS 5, cleared the history and cookies, I haves changed the DNs number to 8.8.8.8, I have worked on this for 3 days now, HELP!!!!

    Try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps BEFORE doing the reset.

  • TS1503 How do I clear the 'other data' on my iPhone 4S? It is using 25% of the available memory.  I do not want to have to wipe it and then reset every thing I use.  That's why I have restore.  Except restore puts the other data back on the phone.

    I've come to the conclusion that Apple is no better than Microsoft.  There was a functional iTunes. I could sync music, playlists, etc; across my iPad and iPhone.  I can't now.  It now eats up storage on my devices with 'other data',  and Apple is silent on what is going on.   I currently have 2 iMacs, 2 iPads, a Macbook Pro, and an AirBook Pro.  I will stop purchasing Apple products.  It is a royal pain to fix anything.  This support page tries my patience to use.  I used to enjoy working with Apple products, simply because they functioned and where intuitive to use.  No more.  Music is impossible to sync across platforms using the same account.  Songs only, no playlists.  This is step back to the early year of systems.  No common data formats, zero portablity, and labor intensive. 
    Way to go Apple,  you've destroyed your reputation!

    Similar issue -- this is the third time in as many months that I've had to restore my iPad. It's a iPad Mini w/ 32GB (ME277LL/A), running the latest iOS8.1.2. The "other" data starts off about 1GB and will bob around that. I was careful about games this time, seeing only a slight rise in the data. Once it started to rise, I deleted all of the game and the data on Game Center. No joy -- the data stays about the same.
    Then I noticed it was really climbing -- shooting up to about 10GB and sitting there, no matter what I did: sync it: nothing. Deleting music (on the off chance it was album art or some such: nothing. Deleted all the books in iBooks: no effect -- still 10GB. Cleared the iCloud storage, cleared caches repeatedly: nothing. Reset everything: no effect. Only Restoring the iPad -- which takes forever and is a gigantic pain in the @$$ -- gets it down. This is exactly the same thing that happened the other two times -- I lose about 10GB to "other."
    I now suspect, thinking on what I was doing with the device, that pulling movies from iTunes seems to be the culprit. Deleting the movies might take the movie "off the iPad", but there seems to be a corresponding jump in Other. My guess is there's some glitch dumping the information elsewhere.
    It makes a 32GB iPad pretty frickin' close to useless in a remarkable amount of time. I've not had this issue until this iPad (bought last summer) with the iOS8 upgrade. I don't see this happen on the iPhone 5S with the same OS...that's why I dialed down to iTunes (when is it not smack in the middle of issues?) and Video as the culprit; I don't watch movies on the phone.
    I've noticed a massive amount of posts in support and around the web on this matter...it might be time for Apple to shift it and do something about the matter. If I'm going to be restricted to surfing the web, email, and little else thanks to the Other issue, it really doesn't make sense to stick with this device. I can doo all that on my laptop, can't it?

  • When I access my google e-mail account on the I-pad my inbox has at least 6 e-mails with no sender and no subject (absent via I-phone, Mac or PC) I cannot delete them as they cannot be selected- how do I stop them and clear the ones there now?

    When I access my google e-mail account on the I-pad my inbox has at least 6 e-mails with no sender and no subject (absent via I-phone, Mac or PC) I cannot delete them as they cannot be selected- how do I stop them and clear the ones there now?

    Try turning the account off and on : Settings > Mail, Contacts, Calendars , then tap the account on the right, slide Mail to 'off', exit settings and go back into the Mail app, and then go back to Settings and slide Mail back to 'on'
    If that doesn't work then try closing the Mail app completely : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    Also do a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • I have a PowerBook G4 with a non-functioning monitor.  It used to work with an external monitor, but I reinstalled the OS, which cleared the display preferences and now when I restart it won't detect the external monitor. How do I fix?

    I have a PowerBook G4 with a non-functioning monitor.  It used to work with an external monitor, but I reinstalled the OS, which cleared the display preferences and now when I restart it won't detect the external monitor. This means I can't use the computer anymore. How do I fix? I tried using the Command+F2 keyboard shortcut, but it doesnt' work.  It's possible that since I reinstalled the OS, it still needs to be set up, so there's only a welcome screen (but since I can't see it I'm not sure).

    There is no limit to the number of times you can re-install Office on the same computer.
    You can activate by telephone:
    The last paragraph is the relevant bit

  • Automatick clearing the vendor open items

    Hi,
    Senario related to intercompany invoice posting through EDI.When ever A/R side cancelling the invoice system will post the credit memo in A/P side through EDI.System automatically clearing the A/R side but in A/P side invoice and credit memo is showing as a open item.Please suggest how to clear these invoice and credit memo automatically.
    Thanks
    Damodar

    Hello,
    You schedule F.13 in the background every night (in non-peak hours)
    Before that make sure that you have proper configuration for "Automatic Clearing" in OB74.
    Regards,
    Ravi

  • F110- not able to clear the debit and credit entry with the same reference

    Hi,
    I am not able to clear the debit and credit entry with the same reference in F110 even after having the payment terms as immediate payment, payment method is maintained in document no and vendor master data. Both debit and credit entry is appearing in FBL1N as an open item but it is not appearing in F110.
    In Log message appear as 8 days grace period is existing whereas as payment term is just 0001- immediate payment.
    Kindly advice me what could be wrong.
    Thanks,
    Manya.

    Hi,
    Credit and debit balance in vendor account are not cleared automatically when only vendor line item has payment method and credit memo has not payment method. Also when there is not payment method maintained in vendor master data.
    In such case to avoid payment to vendor when vendor has debit balance we perform debit balance check.
    In second scenario when u2018individual paymentu2019 is selected in vendor master data vendor invoice and credit memo are not cleared automatically in F110.
    To setoff vendor credit and debit balance in F110 you to uncheck u2018individual paymentu2019 check in vendor master data > company code data > payment data.
    Thanks!
    Raju

  • Unable to clear the recently open files list

    Currently, in order to clear the opened files list, the user has to go into the Windows registry.  This by itself can be bad if the user is not familiar with the registry; could mess up the registry if not very careful.  There appears to be no plug-in/addon for this option nor is there any user option to select to clear the list.  There is a setting in the options/permissions to limit the number of opened files to the list; the minimum number being one(1).  Cannot set this number to zero(0) unless maybe there is a registry fix for this.  I want to suggest that in the next release, or at least as soon as possible, to add to the Adobe Reader (by default) a user option to be able to clear this list with having to enter the registry.  Or, maybe create a plugin/addon to perform this action.  That's it.

    Hi Ineedtoknownow
    You can raise your feature request on below link : https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • How to clear the open documents in case if document currency and local curr

    Hi,
        Can anyboday advise how to clear the open document of a particular vendor for a particular company code. Here the issue is that balace is netted to Zero in the document currency but not in the local currency. The document was posted in Currency CAD and the local currency is GBP.
    When i check the FBL1N, there is it showing net balance is ZERO, but document is still in open
    status. I tried using Transaction code F-44, but it is not allowing me.
    Can anyboday advise how to perform this. Points will be awarded.
    Regards,
    Sree.

    Hi,
    In the Company code global parameters(OBY6),select the check box "NO FOREX RATE DIFF.WHEN CLEARING IN LC"
    and try clearing again.(You can have a F1 help on the check box to see what exactly it is).
    Hope this will resolve
    Assign points if useful
    Thanks
    Aravind
    Edited by: Aravind Aitipamula on May 22, 2008 1:36 AM

  • Document is getting posted but unalble to clear the open items

    hi gurus,
    i m using the inbound idoc ACC_DOCUMENT03 to post the receipt against invoice. uptill now i can post the receipt but it shows the items are still in the open items. i need to clear the open items for the invoice. how to solve it .

    Hi,
    In the Company code global parameters(OBY6),select the check box "NO FOREX RATE DIFF.WHEN CLEARING IN LC"
    and try clearing again.(You can have a F1 help on the check box to see what exactly it is).
    Hope this will resolve
    Assign points if useful
    Thanks
    Aravind
    Edited by: Aravind Aitipamula on May 22, 2008 1:36 AM

  • Unable to clear the invoice/credit in SAP via T-Code F-04

    Hello Guys,
    Unable to clear the invoice/credit in SAP via  T-Code F-04.
    While I proceed to Clear the cutomer open item i am getting below error.
    " The Entry GB XX Is Missing in Table T059Q".
    Kindly suggest what needs to be done to overcome with this message.
    Thanks and regards,
    Hemanth.

    Hi Hemanth,,
    Hope you are using Classic WHT for your company code in country GB.
    And the Classic WHT tcode XX was maintained in customer master data, but the same code would have been deleted from the system. Since these line items to be cleared also, stored that tax code only. So you are getting this erro in F-04.
    So you need to create the above said tax code in OBA7 and then you will be able to clear the customer line items with F-04.
    Regards,
    Srinu

  • Clear the content of Checkbox without looping for every record

    Hi all,
    I am Karthik. I am working in Oracle EBS. I am developing one form in which it contain 2 checkbox. if checkbox1 is selected in 1st record it need to check checkbox2 all the record till the end of the block. when i uncheck it need to do reverse. what i facing during unchecking it need to loop through all the record and it assign the value. I use clear_item(even i know it use only for clearing the text_item) it is not working.
    Is there any other way than this to uncheck?
    Please specify apps property for set_block_property, set_window_property,set_item_instances_property,get_item_property,get_item_instance_property
    the procedure is
    /* This Procedure take care of post processing when button copy is pressed in form
              It take care of
              1.If the number of record in the block exceeds 1000 then it display a message, to confirm the copy to proceed
              2.If it less than 1000 then it directly proceed to copy by enabling copy_from and copy_to checkbox.
              3.Once copy button is pressed the label of copy button changed to cancel copy
              4.Cancel copy button is pressed , copy_from and copy_to checkbox is disabled in form
         Variable Declaration Purpose
         no_alert_button This variable used to track which button is pressed by user when alert message is shown
    PROCEDURE PROC_COPY_BTN_FCN IS
         no_alert_button NUMBER;
    BEGIN
              IF      Get_Item_Property('BLK_PROD_PROFILE.BTN_COPY',LABEL)='Copy'
              THEN
                   IF PACK_FORM_VAR.no_record_count >1000
                   THEN
                                  Fnd_Message.Set_String('Current Block Contain '|| PACK_FORM_VAR.no_record_count ||' Records. Copy may Take Time');
                                  Fnd_message.Show;
                                  no_alert_button :=Show_Alert('ALERT_RECORD_COUNT');
                                  IF no_alert_button =ALERT_BUTTON1
                                  THEN
                                            --IF      Get_Item_Property('BLK_PROD_PROFILE.BTN_COPY',label)='Copy'
                                            --     THEN
                                            --     :parameter.G_query_find := 'FALSE';
                                                 Set_Block_Property('BLK_PROD_PROFILE',Query_allowed,property_false);
                                                 App_Special.Enable('FILE.SMARTBAR_FIND',PROPERTY_OFF);
                                            --     set_menu_item_property('VIEW.FIND',ICON_IN_MENU,property_off);
                                                 App_Special.Enable('VIEW.FIND',property_off);
                                            Set_Window_Property('WIN_PROD_PROFILE',WIDTH,10.3);
                                            Set_Block_Property('BLK_PROD_PROFILE',BLOCKSCROLLBAR_POSITION,9.691,.906);
                                                 App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_CONTINUE',VISIBLE,property_true);
                                                 App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_TO',VISIBLE,property_true);
                                                 App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',VISIBLE,property_true);
                                                 App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',ENABLED,property_true);
                                                 App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',UPDATE_ALLOWED,property_true);
                                            --App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_DESELECT',VISIBLE,property_true);
                                            Go_Item('BLK_PROD_PROFILE.TEXT_PROD_BRAND');
                                            --App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_COPY',VISIBLE,property_false);
                                                 App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_COPY',label,'Cancel Copy');
                                  END IF;
              ELSE
                                  Set_Block_Property('BLK_PROD_PROFILE',Query_allowed,property_false);
                             App_Special.Enable('FILE.SMARTBAR_FIND',PROPERTY_OFF);
                   --     set_menu_item_property('VIEW.FIND',ICON_IN_MENU,property_off);
                        App_Special.Enable('VIEW.FIND',property_off);
                   Set_Window_Property('WIN_PROD_PROFILE',WIDTH,10.3);
                   Set_Block_Property('BLK_PROD_PROFILE',BLOCKSCROLLBAR_POSITION,9.691,.906);
                        App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_CONTINUE',VISIBLE,property_true);
                        App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_TO',VISIBLE,property_true);
                   App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',VISIBLE,property_true);
                             App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',ENABLED,property_true);
                        App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',UPDATE_ALLOWED,property_true);
                   --App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_DESELECT',VISIBLE,property_true);
                   Go_Item('BLK_PROD_PROFILE.TEXT_PROD_BRAND');
                   --App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_COPY',VISIBLE,property_false);
                        App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_COPY',label,'Cancel Copy');
              END IF;
              ELSIF Get_Item_Property('BLK_PROD_PROFILE.BTN_COPY',label)='Cancel Copy'
              THEN
                        Set_Block_Property('BLK_PROD_PROFILE',Query_allowed,property_true);
                        First_Record;
                        LOOP
                             IF :System.Cursor_Record = PACK_FORM_VAR.no_currec
                             THEN
                                            :BLK_PROD_PROFILE.CKBX_COPY_FROM := 'N';
                                            Set_Item_Instance_Property('BLK_PROD_PROFILE.CKBX_COPY_TO',current_record,UPDATE_ALLOWED,property_true);
                             ELSIF :System.Cursor_Record <> PACK_FORM_VAR.no_currec
                             THEN
                                            :BLK_PROD_PROFILE.CKBX_COPY_TO := 'N';
                                       Set_Item_Instance_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',current_record,UPDATE_ALLOWED,property_true);
                                            Set_Item_Instance_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',current_record,INSERT_ALLOWED,property_true);
                                  END IF;
                        EXIT WHEN:System.Last_Record ='TRUE';
                        Next_Record;
                        END LOOP;
                        /*     go_item('BLK_PROD_PROFILE.CKBX_COPY_TO');
                             Clear_item;
                                  go_item('BLK_PROD_PROFILE.CKBX_COPY_FROM');
                             Clear_item; */
                             :BLK_PROD_PROFILE.CKBX_SELECT_ALL :='N';
                             --App_Item_Property.Set_property('BLK_PROD_PROFILE.BTN_DESELECT',visible,property_false);
                        --     App_Item_Property.Set_property('BLK_PROD_PROFILE.BTN_DESELECT',enabled,property_false);
                             App_Item_Property.Set_property('BLK_PROD_PROFILE.CKBX_SELECT_ALL',visible,property_false);
                             App_Item_Property.Set_property('BLK_PROD_PROFILE.BTN_COPY',VISIBLE,property_true);
                             App_Item_Property.Set_property('BLK_PROD_PROFILE.BTN_COPY',ENABLED,property_true);
                             App_Item_Property.Set_property('BLK_PROD_PROFILE.BTN_CONTINUE',VISIBLE,property_false);
                             App_Item_Property.Set_property('BLK_PROD_PROFILE.CKBX_COPY_FROM',VISIBLE,property_false);
                             App_Item_Property.Set_property('BLK_PROD_PROFILE.CKBX_COPY_TO',VISIBLE,property_false);
                             --App_Item_Property.Set_property('BLK_PROD_PROFILE.BTN_DESELECT',label,'Deselect');
                             SET_BLOCK_PROPERTY ('BLK_PROD_PROFILE',BLOCKSCROLLBAR_POSITION,8.5,0.906);
                             set_window_property('WIN_PROD_PROFILE',width,8.9);
                             App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_COPY',label,'Copy');
                             App_Special.Enable('VIEW.FIND',property_on);
                             App_Special.Enable('FILE.SMARTBAR_FIND',PROPERTY_ON);
              END IF;
    END;
    Please help me to solve this issue.
    thanks and regards
    Karthik M

    You are creating your vaiables in the declerative block as
    <%!
    String [] equipment=new String[60];
    String [] type=new String[60];
    int i=0;
    int j=0;
    %>
    Place these declerations outside the declerative block i.e. in simple scriplets....
    Now on each page access you will get fresh variables
    Hope this helps...

Maybe you are looking for

  • Boot Camp Assistant refuses to recognize my Windows 7 Installation Disc nor my USB

    I have an iMac 20inch, early 2008 model. Back when I was running Leopard I installed Windows 7 with Boot Camp from a Windows 7 Installation ISO my friend had and I burnt it to a DVD and installed it without any problems. Later, after I got tried of w

  • Application error occurred during request processing.

    Hi, I got the following error when you invoke a method of a web service deployed on my local server Details:com.sap.engine.services.webservices.wsnavigator.WSNavigatorException: null Exception id: I don´t have any compilation errors in the Java sourc

  • Ringtones for each contact in N900

    Is there any way to assign a ringtone for each contact in N900. Any tutorial or application for this is appreciable.

  • Re: 18 month of BT FAILURE, tricks, and abysmal s...

    I must admit I thought I was bad but I've only had three and a half months of the same or similar problems with bt and have followed the ame paths India/ support - email to CEo etc. The last action taken by bt or rather openreach was to ask me to put

  • Digital Certificates and signing

    i am developping a security application that needs to access the web client certificate store to enable him once he choose to submit his form to select which cetificate to sign with; i need to know how to access in java the certificate store on the c