Scroll bar does not retain its position after or before pack

Hi
My Scroll bar does not retain its position after pack in my application.
But i need to retain its state.
My code snippet is :
System.out.println("VAlue--->" + getHXValue());
scrollPane.getHorizontalScrollBar().setValue(getHXValue());
pack();
My VAlue printed is 100.
But my positon of scroll bar is at 0 th location.
Can any one help me.....

Swing related questions should be posted in the Swing forum.
My code snippet is :Snippets don't help.
If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",
see http://homepage1.nifty.com/algafield/sscce.html,
that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
Don't forget to use the "Code Formatting Tags",
see http://forum.java.sun.com/help.jspa?sec=formatting,
so the posted code retains its original formatting.

Similar Messages

  • Scroll bar does not appear in some PDF files. How can I enable it?

    Scroll bar does not appear in some PDF files. How can I enable it?

    Scroll bars are supposed to appear when needed.
    For example, scroll bars will appear when you zoom in on a page.
    FAQ: How to zoom in/out on a page
    Windows 8 automatically hides scroll bars after a few seconds of inactivity.  Scroll bars will reappear when you touch the screen and move your finger (on a Touch-enabled device) or move your mouse.
    Additionally, page navigation depends on the view mode (Single Page vs. Continuous Page).
    In the Single Page mode, you can swipe left/right (horizontally) or click the left/right arrow button with your mouse to go to the previous/next page.
    In the Continuous Page mode, you can swipe or scroll up/down (vertically) to go to the previous/next page.

  • The scroll bar does not show in my SaaS application.

    I have a spreadsheet application and the scroll bar does not show on FF4. I need the scroll bar to navigate the app.

    table is surround by panelStretchLayOut but I examine this and has no difference.
    scrollBar show for data under one milion records!!
    and here is my code:
    <af:popup id="t1DataPopup"
    binding="#{B1Bean.t1DataPopup}">
    <af:dialog id="d9"
    type="ok"
    affirmativeTextAndAccessKey="#{viewcontrollerBundle.okLabel}"
    title="#{bindings.R1.hints.label} : #{bindings.R1.inputValue}"
    inlineStyle="position: absolute; left: -410px; top: -200px;">
    <af:panelStretchLayout id="psl4" topHeight="30px"
    inlineStyle="width:800px; height:400.0px;">
    <f:facet name="bottom"/>
    <f:facet name="center">
    <af:table value="#{bindings.s1Graph.collectionModel}"
    var="row"
    rows="#{bindings.s1Graph.rangeSize}"
    emptyText="#{bindings.s1Graph.viewable ? viewcontrollerBundle.noDataToDisplayMessage : viewcontrollerBundle.accessDeniedMessage}"
    fetchSize="#{bindings.s1Graph.rangeSize}"
    rowBandingInterval="0"
    filterModel="#{bindings.s1GraphQuery.queryDescriptor}"
    queryListener="#{bindings.s1GraphQuery.processQuery}"
    filterVisible="true" varStatus="vs"
    selectedRowKeys="#{bindings.s1Graph.collectionModel.selectedRow}"
    rowSelection="single" id="t1"
    partialTriggers="::s1Graph ::s1BarGraph ::s1HoriBarGraph ::s1AreaGraph"
    autoHeightRows="-1">
    <af:column sortProperty="T1Stmp"
    filterable="true" sortable="true"
    headerText="#{bindings.s1Graph.hints.T1Stmp.label}"
    id="c94" align="center">
    <af:outputText value="#{row.T1Stmp}"
    id="ot139"/>
    </af:column>
    </af:table>
    </f:facet>
    <f:facet name="start"/>
    <f:facet name="end"/>
    <f:facet name="top">
    <af:panelGroupLayout id="pgl20">
    <af:commandButton text="#{viewcontrollerBundle.saveAsExcelCommandButtonLabel}"
    icon="/Images/excel.gif"
    id="cb9">
    <af:exportCollectionActionListener exportedId="t1"
    type="excelHTML"
    title="T1Data"/>
    </af:commandButton>
    </af:panelGroupLayout>
    </f:facet>
    </af:panelStretchLayout>
    </af:dialog>
    </af:popup>
    and fetchsize=25
    Edited by: Mansoor on Jul 17, 2012 8:28 AM

  • Vertical Scroll bar does not appear in table control

    Hi ,
    I have a table control with both vertical and horizontal scroll bars.
    The data which comes is always more than 50 and the visible line size is 8.The vertical scroll bar
    does not appear at times..but if i run the program again, it appears..
    Sometimes it appears and sometimes no vertical scroll bar comes thought the data is more than the visible lines.
    Any suggestions ? why is this happening?
    Regards,
    Sharadha

    You have inserted data in the internal table and not "informed" the table control
    In the PBO, use a statement like
    DESCRIBE TABLE <itab> LINES <control>-lines.
    Regards

  • When I go to websites the right scroll bar does not appear

    hen I go to websites the right scroll bar does not appear

    what is the url. Did you make the screen as wide as possible.
    A lot of web designers appear to think you have a lot of wasted unused space and are all to happy to "help you" make the most of that space.

  • I am using CS6 and when I go to save an image for Web the image does not retain its quality

    I am using CS6 and when I go to save an image for Web the image does not retain its quality. The first week I did this it worked just fine and now the images save very pixely.
    Here is a screenshot of my image on the artboard as I am editing it
    Here is a screenshot of the image as I'm trying to save it for Web
    As you can see, the image becomes pixely. I have tried to save it as every type of png and jpeg but nothing seems to work. I have no idea why it has started to do this. Please help!

    Change None to Art optimized then click apply(alteast in CS5 there was an apply, believe they removed that in CS6 as so many people missed that part).

  • Mac OS 10.9.2 Reader 11.0.7 does not initialize, cannot fill in fillable forms and side scroll bars does not operate.  Can you please help?

    Mac OS 10.9.2 Reader 11.0.7 does not initialize, cannot fill in fillable forms and side scroll bars does not operate.  Can you please help?

    Perhaps you missed that you started a discussion at I have OS 10.9.2 and have downloaded latest version of Reader 11. I can no longer fill in form or scroll using the side bar. and you did not respond to the last post there.

  • Brand new 27" iMac scroll bar does not appear

    Scroll bar does not appear in almost any window. To make it appear, one way I make it appear is to grab the lower right hand corner and move the window size a little bit. The scroll bar appears. But when I try to then grab the scroll bar, I must stay INSIDE the window as I move my cursor toward the scroll bar.
    Sometimes swiping down on the cursor to move the page down, the scroll br will appear.
    But there is a basic problem. The scroll bar does not appear without EXTRA moves of some kind to make it appear.
    By the way, the scroll bar in the window I am in RIGHT NOW is appearing without EXTRA moves.
    An Apple Tech wen through this with me on the phone and could not resolve the problem
    This is the FIRST problem I have had in TWENTY NINE YEARS that Apple Techs could not solve for me.
    Help anyone?
    Phil Russell

    Here you go.

  • All time Bug! Accordion widget does not retain content position as in design view

    I have noticed that content placed inside an accordion widget that is stretched to fill browser width do not retain the position of its elements. This is very annoying as ones layout does not look right and balanced across screen.

    That was it KathH --- THANKS!!!
    Had created the row w/out <td> cells to carry the top banner (sort of cheating) on spanning the cells i guess ( )
    Anyway, re-wrote so that the banner table was independant and did not require span and picked up the data table independantly.
    Problem solved and designer picked up the image precisely.
    Thanks again!!!
    Curious though that the image is dependant on the <td> tag.  I would have expected any image called within the page to display in the designer regardless of location in the html.
    Oh well, fixed and onto the next challenge.
    Once more THANKS!!!

  • Scroll bar does not scroll far enough to view last page in thumbnail images

    When using Adobe Acrobat, and have the thumbnails/pages panel open on the left side, the scroll bar will not scroll far enough down to show the last row of thumbnails. For example, have a 40-page document open with the Pages Panel open showing page thumbnails in rows of 3. When the scroll bar reaches the bottom, the last row shows pages 37, 38, and 39. Where is page 40? If you look closely, you can see a sliver of the top of the thumbnail below page 37. There is no way to view the thumbnail because it is at the bottom of the list, and your scroll bar has reached its end.
    Is it confirmed that this is a bug in Adobe? If yes, is there any hotfix available for it?
    Your help will be greatful.
    Thanks

    How can I report this bug to Adobe? Is there any link where I can post this bug to Adobe or  email or contact details?
    Thanks

  • Scroll Bar does not show using Mac OS X 10.10.1, Thunderbird 31.3.0

    I upgraded to Thunderbird 31.3.0, running Mac OS X 10.10.1. The scroll bars in both the inbox window and the message text window seem to have disappeared. There does not seem to be any support available on this.

    ''Matt [[#answer-671555|said]]''
    <blockquote>
    Ok so you most likely have an add-on or theme that is not compatible with the current version. Check in the add-ons manager for updates. Disable all add-ons and enable one at a time until the culprit is found.
    How does OSX 10.10.1 handle scroll bars. Perhaps appearing and disappearing is a new mac feature. Windows hiding menu bars is an infuriating OS feature, perhaps it is the mac users turn.
    </blockquote>
    Turns out, this is the case.
    If I drag two fingers over the Track Pad, the Scroll Bar does appear. If I don't let go of the Track Pad, and roll over to the Track Bar it stays up. I hate it, but now I have a work-around.
    Thank you, Matt.

  • Horizontal Scroll Bar does not show

    I have a method which creates a table with values and displays it in a dialog. However, the horizontal scroll bars do not appear, even though there is are columns that are not seen in the view. Here is my code:
         private void setTable()
              Object columns[] = headerLST.toArray(),
                        rows[][] = new Object[rowLST.size()][headerLST.size()];     
              for(int x = 0; x < rowLST.size(); x++)
                   java.util.List list1 = (java.util.List)rowLST.get(x);
                   for(int y = 0; y < list1.size(); y++)
                        rows[x][y] = (String)list1.get(y);     
              DefaultTableModel tValues = new DefaultTableModel(rows, columns);
    JTable tableA = new JTable(tValues);
         tableA.setRowHeight(27);
                   tableA.setRowSelectionAllowed(false);
                   tableA.setColumnSelectionAllowed(false);
                   tableA.setFont(new Font("Dialog", Font.BOLD, 12));
              int minColWidth = 120, maxColWidth = 200;
              for(int y = 0; y < tableA.getColumnCount(); y++)
                   TableColumn tbc = tableA.getColumnModel().getColumn(y);
                   tbc.setPreferredWidth(minColWidth);     
                   tbc.setMinWidth(minColWidth);
                   tbc.setMaxWidth(maxColWidth);
              scrollA = new JScrollPane(tableA);
              this.getContentPane().add(scrollA, BorderLayout.CENTER);
    Can someone tell me what I am missing?
    Thanks
    Augustine

    You need this
    tableA.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    otherwise it will always try and fit the table to the space available

  • On the right side of the br5owser there is a scroll bar, that scroll bar does not have any contrast and is almost invisible, can't find it ???

    Have seen some other questions similar to mine and they may be about same issue , but they say that the scroll bar vanishes, in effect it is still there but nearly invisible. Trying to click on it without knowing the exact location however causes the page to scroll uncontrolled. The other questions advised people to reset their browser to default but that didn't help at all. Have had this same issue for about the last 6 versions of firefox, all say in the 30s versions. Tried adding high contrast in Windows as an experiment but that didn't help at all either. Been trying help for some time and just now decided to ask my own question as other questioners may have given up or answerers may think it is resolved.
    In searching through help files it has led me to find a space based theme for the browser that I enjoy, but does not solve issue of course, so... all is not lost. Took a jpg of the image of the browser that shows the issue and am trying to upload it but looks like it is stuck in upload mode. Ugh "high speed" , anyhow maybe it uploaded and is not showing, the bar on the right is about 3/4 of the way down the side if you can see it, almost invisible.

    Did you try Firefox Safe Mode?

  • Scroll bar does not slide when dragged using curser in word

    I need answers to two questions.
    1.   How to maximise a word document to full window size.
    2.   Why the side scroll bar of a document does not slide when dragged.
    3.   Am very  used to the "delete", "page up and page down" keys and cant find them on keyboard.
    Thanks.

    What you can try if the above doesn't work, is deleting the scroll bar from your Data List, and then dropping it back in from the Library. The act of re-adding the scrollbar may get you the desired behavior.
    If that doesn't work, you will probably need to post your project so we can take a look.
    -Bear

  • Scroll bar does not work when creating a datalist

    So I created a very simple vertical scrollbar from 2 stretched rectangles (a thumb and a track). I also grouped a text field and a square together, that would make up the list items.
    Next, I selected the scrollbar and the list item, and created a data list from them. When I tested the project, however, I could move the scrollbar without any problems, but the items in the list did not move. I also tried adding some more items to the list, which didn't help either.
    Then i tried using the component from Flash Catalyst, instead of my "home-made" scrollbar. Making a data list out of this, and testing the project gave the desired result.
    I'd really like to use my own made scrollbar here, and I have the feeling that I missed something completely obvious on the way that I forgot.
    Note: I checked several times if I had forgotton to "edit the parts" of the scrollbar and data list, but I had selected all the parts as required.

    What you can try if the above doesn't work, is deleting the scroll bar from your Data List, and then dropping it back in from the Library. The act of re-adding the scrollbar may get you the desired behavior.
    If that doesn't work, you will probably need to post your project so we can take a look.
    -Bear

Maybe you are looking for

  • Can i search for one text or another or both?

    Hi guys, I am back again with another question.  I want to create a spreadsheet that indexes a greater spreadsheet for either a name or a job name within a given date interval.  I have been able to this in two separate tables now, but I would like to

  • Installing and Using Logic Studio and Final Cut Studio 2 On the Same iMac

    In March of this year, I switched from being a long-time user of PC's to a 24 in. 2.4 GHZ iMac. In late May I purchased Final Cut Studio 2 and Aperture and have greatly enjoyed using both of these applications on my iMac. Both run with no problems un

  • VGA output on new iMac G5 (iSight)

    According to the tech specs, the new iMac G5 (iSight) can mirror its internal display onto an external VGA display (using the optional adapter). Can someone who has both the new iMac and the adapter please test whether it actually outputs two differe

  • Firefox 14 doesn't work on Samsung Galaxy S2 with Android 4.0.3

    After Firefox update to version 14, it doesn't open any site from awesome bar and only once from thumbnail from home page. My config is Android 4.0.3 Samsung Galaxy S2 and Firefox14. Anyone faced similar issue?

  • Connecting WRT300N to WRE54G over Cat5 wire :\

    Does that work? Again, can I connect a wireless-g range expander (WRE54G) using an ethernet network cable to a wireless-n router/gateway and get them to work together? Why? Because I already have both and there's a big gap in the middle. Mirage