Help me debug when i scroll down my scrollbar

had this bug for like a year now.
so i add a message to to my dlm1
then jsp1 should tell
jsp1 to expand its size immidietly to fit the message
however when i tell it to scroll down to its maximum size it does that -1 row, so its not fully scrolling down, just almost.
i was thinking that the maximum size just hadn't been updated yet but maybe i'm thinking wrong?
help please.
DefaultListModel dlm1;
JList jl1;
JScrollPane jsp1;
public synchronized void AddMessage(String message){
        System.out.println(jsp1.getVerticalScrollBar().getMaximum());
        dlm1.add(dlm1.size(),message); //increases the scrollbar maximum?
        jsp1.getVerticalScrollBar().revalidate(); //doesnt help
        jsp1.getVerticalScrollBar().validate(); //doesnt help
        JScrollBar jsb1 = jsp1.getVerticalScrollBar();
        jsb1.setValue(jsb1.getMaximum()); //scrolls down to as much as possible?
        System.out.println(jsp1.getVerticalScrollBar().getMaximum());
    }

Sorry i forgot there was a swing forum. Should i repost it there?
Anyways i changed the code to this and none of theese work. They do work 50% of the times but that happend with my previous code aswell.
public void AddMessage(String message){
        dlm1.add(dlm1.size(),message); //adds a message and increases the scrollbar maximum?
        jl1.ensureIndexIsVisible(jsp1.getVerticalScrollBar().getMaximum()+1);
        SwingUtilities.invokeLater( //swing seems uneccesairly tricky :(
            new Runnable(){
                public void run(){
                    jsp1.getVerticalScrollBar().setValue(jsp1.getVerticalScrollBar().getMaximum());
                        //scrolls down to as much as possible?
        jl1.ensureIndexIsVisible(jsp1.getVerticalScrollBar().getMaximum()+1);
captfoss wrote:shrug Just add a padding row at the end.I added an empty row but since scroll down works 50% of the times the result is a very skippy display :(
Edited by: ColacX on Dec 11, 2008 1:35 PM

Similar Messages

  • I have added/embedded four videos on my website, but when I scroll down, the videos scroll in front of the top menu instead of behind as it should. I have tried changing layers, etc., and nothing works. Can you help?

    I have embedded 4 videos on my website. It is a single page, scrolling site. When I scroll down, the videos scroll in front of the top menu bar, instead of behind it. I have tried changing layers, etc., and nothing works. Please help.
    Thanks.
    Paul W. Norman

    Hi,
    Kindly create a new layer, via the Layers panel:
    Then, right click on the navigation bar, and choose Move to Layer > Layer 2
    Ensure that Layer 2 is on top of the other layers.
    Hope it helps,
    Sonam

  • Hello, when I scroll down in one of my pages the contact below doesn't appears.

    Does anyone know how to fix this. here is the link to the page: http://jorgequero.com/patio2/personalized-gifts.html
    This was happening in all the pages when I was previewing the site on my computer then when I uploaded it is happening just in one pages.
    Thanks!

    When I scroll down the las image and the footer content is not visible, then when I scroll up the header content and menu are not visible, at the beginning they are but not when I come back.
    I'm attaching some pictures.
    This is how should it looks:
    This is how it look when I scroll down:
    Then when I scroll back to top, the header and menu disappear.
    Thanks a lot for your help.

  • Vertical scrollbar not showing all the records when I scroll down.

    Vertical scrollbar not showing all the records when I scroll down.
    Using Oracle forms 10g , operating system windows
    I have two fields with number of items dispayed = 15.
    I have a vertical scroll bar with them. There are 34 records in the table but the scrollbar only shows 15 records.
    Here are the properties for block / scrollbar.
    WORK_CATEGORY
    - Subclass Information                           
    - Comments                                       
    * Navigation Style                                Same Record
    - Previous Navigation Data Block                 
    - Next Navigation Data Block                     
    - Current Record Visual Attribute Group          
    - Query Array Size                                0
    - Number of Records Buffered                      0
    * Number of Records Displayed                     60
    * Query All Records                               No
    - Record Orientation                              Vertical
    * Single Record                                   No
    - Database Data Block                             Yes
    - Enforce Primary Key                             No
    - Query Allowed                                   Yes
    - Query Data Source Type                          Table
    * Query Data Source Name                          WORK_CATEGORY
    * Query Data Source Columns                      
    * Column Name                                   JOB_TYPE
    * Column Type                                   VARCHAR2
    - Column Type Name                             
    - Parent Column                                
    * Length                                        30
    * Precision                                     0
    * Scale                                         0
    * Mandatory                                     Yes
    * Column Name                                   WORK_CATEGORY
    * Column Type                                   VARCHAR2
    - Column Type Name                             
    - Parent Column                                
    * Length                                        30
    * Precision                                     0
    * Scale                                         0
    * Mandatory                                     Yes
    - Query Data Source Arguments                    
    - Alias                                          
    - Include REF Item                                No
    * WHERE Clause                                   
    * ORDER BY Clause                                 job_type
    - Optimizer Hint                                 
    - Insert Allowed                                  Yes
    - Update Allowed                                  Yes
    - Locking Mode                                    Automatic
    - Delete Allowed                                  Yes
    - Key Mode                                        Automatic
    - Update Changed Columns Only                     No
    - Enforce Column Security                         No
    - Maximum Query Time                              0
    * Maximum Records Fetched                         0
    - DML Data Target Type                            Table
    - DML Data Target Name                           
    - Insert Procedure Name                          
    - Insert Procedure Result Set Columns            
    - Insert Procedure Arguments                     
    - Update Procedure Name                          
    - Update Procedure Result Set Columns            
    - Update Procedure Arguments                     
       Don't know where am I going wrong. I'll really appreciate if you can help me in this.
    Thanks.
    Edited by: 831050 on Sep 14, 2011 8:05 AM

    One of the items is a list item.. here are it's properties:
    * Name                                          JOB_TYPE
    * Item Type                                     List Item
    - Subclass Information                         
    - Comments                                     
    - Help Book Topic                              
    - Enabled                                       Yes
    * Elements in List                             
    * Label                                      
    * List Item Value                             LIST20
    * List Style                                    Combo Box
    - Mapping of Other Values                      
    - Implementation Class                         
    - Case Restriction                              Mixed
    - Popup Menu                                   
    - Keyboard Navigable                            Yes
    - Mouse Navigate                                Yes
    - Previous Navigation Item                     
    - Next Navigation Item                         
    - Data Type                                     Char
    - Data Length Semantics                         Null
    - Maximum Length                                30
    - Initial Value                                
    * Required                                      Yes
    * Copy Value from Item                         
    - Synchronize with Item                        
    - Calculation Mode                              None
    - Formula                                      
    - Summary Function                              None
    - Summarized Block                             
    - Summarized Item                              
    - Current Record Visual Attribute Group        
    - Distance Between Records                      0
    * Number of Items Displayed                     15
    - Database Item                                 Yes
    * Column Name                                   JOB_TYPE
    - Primary Key                                   No
    - Query Only                                    No
    - Query Allowed                                 Yes
    - Insert Allowed                                Yes
    - Update Allowed                                Yes
    - Update Only if NULL                           No
    - Visible                                       Yes
    * Canvas                                        CANVAS2
    - Tab Page                                     
    * X Position                                    47
    * Y Position                                    137
    * Width                                         187
    * Height                                        18
    - Visual Attribute Group                        DEFAULT
    - Prompt Visual Attribute Group                 DEFAULT
    - Foreground Color                             
    * Background Color                              white
    - Fill Pattern                                 
    - Font                                         
    * Font Name                                     Tahoma
    * Font Size                                     10
    * Font Weight                                   Demilight
    * Font Style                                    Plain
    * Font Spacing                                  Normal
    * Prompt                                        Job Type
    - Prompt Display Style                          First Record
    * Prompt Justification                          Start
    * Prompt Attachment Edge                        Top
    - Prompt Alignment                              Start
    * Prompt Attachment Offset                      10
    * Prompt Alignment Offset                       0
    - Prompt Reading Order                          Default
    - Prompt Foreground Color                      
    - Prompt Font                                  
    * Prompt Font Name                              Tahoma
    * Prompt Font Size                              10
    * Prompt Font Weight                            Bold
    * Prompt Font Style                             Plain
    * Prompt Font Spacing                           Normal
    - Hint                                         
    - Display Hint Automatically                    No
    - Tooltip                                      
    - Tooltip Visual Attribute Group               
    - Direction                                     Default
    - Initial Keyboard State                        Default
    - Keyboard State                                Any
        

  • How to make a scroll animation constantly fixed after scrolling? I want the animation to Start when I scroll down, but I don't want the animated thing to disappear when I scroll up again.

    How to make a scroll animation constantly fixed after scrolling? I want the animation to Start when I scroll down, but I don't want the animated thing to disappear when I scroll up again.
    I know how to start the animation by scrolling down, but I simply want it to stay there after it. Could you help me please, guys?

    Hi Tom,
    There is no native feature in Muse to achieve this.
    Regards,
    Aish

  • When I scroll down in facebook my screen turns black.

    When I scroll down on facebook my screen turns black for a few seconds. In the past, it used to do it only on tumblr, but it hasn't happened there in quite a while.
    At that time, I actually thought it was do to my computers memory (I tend to leave my computer on a lot and I also tend to have many active windows and tabs) but now, it sometimes does it within only a few minutes of restarting my computer, when I haven't done a whole lot, so I don't think it's memory.
    It has only happened on those sites and on both, there's infinite scrolling and constant loading of information, so perhaps it's to do with that.
    It always comes back after a couple seconds if I continue to scroll, but if I stop scrolling, it stays black indefinitely.
    I do have a screenshot showing exactly what it does, but I wasn't sure how to submit it, but I'd be happy to do so, if needed, if I can get some instructions on how to do it.
    At this time, it's more annoying than anything else, but if it's a sign of a bigger issue with my computer, I need to figure it out.
    Any help would be appreciated. Thanks

    Aha! Here's a screenshot of what it does .... As you can see, it's not the whole screen that is black. Just the part I want to read ...

  • What I'm trying to do is when I scroll down the page have the images that are on the page stay the same look as I scroll

    What I'm trying to do is when I scroll down the page have the images that are on the page stay the same look as I scroll

    Use the scroll motion tools and set the settings all to 0

  • How do you get it to show the temperature when you scroll down?

    On some some IDevices I see when you scroll down, it shows the temperature and the date. But on my iPad mini when I scroll down, it just shows the day. But at the bottom it says, " weather information provided by yahoo" I have yahoo weather installed. How do I get it to show the temperature too? Thanks.

    Settings->Privacy->Location Services->Weather-> Turn it on.
    It will show your current locations weather. Note that it uses GPS and internet access. so it may use your Cellular Data and battery.

  • Can i make a button change anchor link when you scroll down the site?

    I am trying to make a scroll site.. and i have navigation buttons on the right, a full menu, but also a "1 topic up" button and "1 topic down" button.
    Is there any way that i can have those buttons change anchor link when you scroll down the site.
    Example:
    I am at home, then i press "1 topic down" and gets scrolled to the next topic on the website, but then i cant make the button change to link to the anchor below that, so the button becomes useless after that 1 press.
    Is that in any way possible in Muse to make it change link?

    Hi
    You can try to create different buttons on page positions where down scrolling will be active with separate button actions. For example you click on "I topic down" , page scrolls and there is another button placed with "Next Topic down" , on click this would scroll the page more and similarly along the length of page.
    Button with anchor link scrolling down the page cannot be used for different anchor links, creating different buttons with anchors is the solution.
    Thanks,
    Sanjit

  • To retain the title bar as in the page when we scroll down the report.

    Hi,
    I want to retain the Report name in the page when i scroll down to access the report columns. i don't want the report name to disappear when we scroll down the report.
    Is that possible??
    if yes...how??
    Thanks.

    Hi,
    Try to configure Freeze Panes in OBIEE11g it will resovle your issue (obiee11g version obiee11.1.1.6.0 and above)
    http://oraclebisolutions.blogspot.com/2012/12/freeze-column-headers-in-obiee-11g111160.html
    http://ebs2obiee.wordpress.com/2012/05/08/freeze-panes-in-obiee11g-working-solution/
    Thanks
    Deva

  • When i scrolling down/up in safari the display gets brighter and blurs little bit!(macbook pro 2012, 3days old)

    when i scrolling down/up in safari and firefox the display gets brighter (for instance when the screen and texts in a page is blue it gets light blue and little blurs by scrolling) and when i stop scrolling the screen gets plain.

    If it is only blurring on the words and not the stationary dock then it is because the screen does not have a great response time. 

  • Bug in iphoto, when i scrolled down the photos went disappear.

    the photos when disappear when i scroll down, some of them are appearing while some are not. there's means to have a bug. what should i do?

    nercv:
    It's not a but but probably a problem with ownership and permissions on the image files. Try the following: download and run BatChmod on the iPhoto Library folder with the settings shown here, substituting your account name for mine. You can either type in the path to the folder or just drag the folder into that field.

  • I just installed the new mountain lion software on my iMac.  I was currently running Snow Leopard.  My problem is with my mouse.  Now when I scroll down the page it moves in the opposite direction. I checked system S.P. - Natural for scroll feature.

    I just installed the new mountain lion software on my iMac.  I was currently running Snow Leopard.  My problem is with my mouse.  Now when I scroll down the page it moves in the opposite direction. In system preferences I tried checking and unchecking Natural for scroll feature. Movement from side to side works fine.  Has anyone experienced this problem?

    I think this new scrolling behaviour was introduced with Lion. You do get used to it pretty quickly (well I did). Are you sure that deselecting Natural Scrolling in Mouse Prefs doesn't re-instate the previous behaviour, it does here.

  • How to turn off sound in twitter app when I scroll down?

    I know there must be an easy way to do this, but I can't find it. I have twitter notification sounds turned off, which is what I want. Inside the twitter app, though, when I scroll down to see new tweets, I get a sort of suck-then-pop sound. I don't need that sound and would like to turn it off, as it irritates my spouse if she's nearby while I'm checking twitter.
    Phone is iPhone 5, iOS 8.1.3

    Depends if the window has a separate volume control or not.  You can have multiple QuickTime movies running with the sound muted in some but not others - just slide the volume all the way down in the ones you don't want to hear.
    Other than that, I don't know of a way.

  • When i scrolled down, the photos disapper in random order

    in iphoto i can't see all the photos when i view into the folder, some of them are appearing while some are not and vice versa when i scrolled down,

    nercv:
    It's not a but but probably a problem with ownership and permissions on the image files. Try the following: download and run BatChmod on the iPhoto Library folder with the settings shown here, substituting your account name for mine. You can either type in the path to the folder or just drag the folder into that field.

Maybe you are looking for

  • Proper process for multiple digital signatures?

    Hello, I am trying to solve a little process problem that I'm hoping Acrobat can function for. First off, for reference I am currently using Acrobat 9 Pro. My company has engineering standards documents that require multiple department head signature

  • Error occurred in UPDATE_INFOCUBE

    Error message during processing in BI Diagnosis An error occurred in BI while processing the data. The error is documented in an error message. System Response A caller 01, 02 or equal to or greater than 20 contains an error meesage. Further analysis

  • Creative Cloud Exit Strategy?

    Exit Strategy? Scenario: After subscribing to the Creative Cloud for 3 years, your original perpetual license will no longer be upgradeable (Or sooner after this year for  CS3 CS4 users). You decide to end the CC subscription for whatever reason (not

  • Select point on chart and retrieve more than just data

    var ShiftChart = document.FR_Runtime_ShiftHistory.getChartObject(); var selDate = ShiftChart.getYDataValueAt(1,ShiftChart.getLastSelectedPoint()); alert(selDate); When dealing with a grid I can find the select cell value of column 1 or whatever colum

  • Reset Page Number for each Group

    I am currently creating a RTF template using XMLP 5.0 My demanding boss gets back in town in five days, and he expects this report to be ready for production. :) But I haven't been able to figure out one last spec. The page number needs to be reset f