Scrollpane - no scrollbars when minimised

Does anyone know what the cause of this problem is? When I minimise the screen I won't get any scrollbars when the contents within the scrollpane is larger than the scrollpane (and when no scrollbar is required in a miximised position). However if the contents is larger then the scrollpane in the maximised position then scrollbar will appear. My programs have some components witin a panel within a scrollpane within a tabbedpane.
Thanks
Peter Loo

Maybe your JScrollPane should not have a setMinimumSize,
and your scrolled JPanel should have a setMinimumSize.

Similar Messages

  • How do I disable the scroll to top button that pops up on the right side of a webpage to the left of the scrollbar when lookin at long webpages (such as ebay) ?

    Button appears in the right lower corner to the left of the scrollbar when scrolling down long-ish webpages. I find it tremendously annoying as it covers the information underneath and when I hit it accidentally it obviously makes the whole webpage jump back to the top. Any idea how I can get rid of it ? Thanks heaps for your help !

    ok, glad that the issue could be cleared up this way...
    you could use adblock plus to hide those elements on ebay though. therefore you'd have to go into the adblock filter settings & add the following filters to your custom element hiding rules:
    ebay.com#a(id=gh-bt)
    ebay.com#b(class=bk2top)

  • Prevent android app audio playing when minimised

    My android app has some looping background audio. When I minimise the app by selecting the "home" button on my Nexus 7 - the app disappears but I can still hear the audio playing. I assume the app must be still active in the background. The same app on the iPad doesn't exhibit this behaviour so I guess something different in how Android deals with apps that are not in the foreground.
    Would appreciate advice on best way to prevent this audio playing. Ideally I don't want to completely shut down the app when minimised.
    All advice much appreciated
    My app was compiled with Flash CS6 and Air 3.5.

    I listen for Event.DEACTIVATE
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/Event.html #DEACTIVATE
    When the app is minimized and that event fires, I just stop or mute the audio the same way i normally would

  • Use scrollbars when panel too small for components in it

    Hi
    I've got a JPanel which just uses flow layout to contain some components. The panel resizes with the JFrame it is in, and wraps the components to new "rows" of components if the width of the JFrame gets too small. Fine.
    If the space available is not sufficient, the components go off the bottom of the JPanel.
    So I thought "put the JPanel inside a JScrollPane".
    Problem is that the JScrollPane does not try to wrap the components to a new row of components if the width of the JFrame is too small. Instead, it displays the horizontal scrollbar, and ignores the fact that there is more space available.
    Below is some code - run the main method to see what I mean.
    If I set the layout for the JScrollPane to something else than the default ViewportLayout (eg GridLayout), then the components wrap to new rows as I want, but the horizontal scrollbar displays then, and it should not. Moreover, the vertical scrollbar never displays at all, even when the JFrame is not tall enough to display even a single rows of components.
    Can anyone show me what I am supposed to do?
    Thanks
    Mark
    package com.evotec.CCDViewer.Real3.mypackage;
    import java.awt.*;
    import javax.swing.*;
    public class TestScrollPanes extends JFrame  {
      private JScrollPane jScrollPane1 = new JScrollPane();
      private BorderLayout borderLayout1 = new BorderLayout();
      private JPanel jPanel1 = new JPanel();
      private JButton jButton1 = new JButton();
      private JButton jButton2 = new JButton();
      private JButton jButton3 = new JButton();
      private JButton jButton4 = new JButton();
      private JButton jButton5 = new JButton();
      private GridLayout gridLayout1 = new GridLayout();
      public TestScrollPanes() {
        try {
          jbInit();
        } catch(Exception e) {
          e.printStackTrace();
        this.setSize(500,500);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        this.setVisible(true);
      public static void main(String[] args) {
        new TestScrollPanes();
      private void jbInit() throws Exception {
        this.getContentPane().setLayout(borderLayout1);
        this.setSize(new Dimension(354, 270));
        jScrollPane1.getViewport().setLayout(gridLayout1);
        jButton1.setText("jButton1");
        jButton2.setText("jButton2");
        jButton3.setText("jButton3");
        jButton4.setText("jButton4");
        jButton5.setText("jButton5");
        jPanel1.add(jButton1, null);
        jPanel1.add(jButton2, null);
        jPanel1.add(jButton3, null);
        jPanel1.add(jButton4, null);
        jPanel1.add(jButton5, null);
        jScrollPane1.getViewport().add(jPanel1, null);
        this.getContentPane().add(jScrollPane1, BorderLayout.CENTER);
    }

    Custom24, the problem you are running into is due to a conflict between the
    FlowLayout and the ScrollPane; FlowLayout only wraps components when
    it hits the width of the panel, but inside a ScrollPane, the panel can be as
    wide as it wants. So, you have to limit that somehow. Also, FlowLayout goes
    right after the width of the panel, not the preferred width, and not via an
    accessor; it uses it directly.
    So, this seems to work.
    import java.awt.*;
    import javax.swing.*;
    public class TestScrollableFlowPanel extends JFrame {
         public static void main( String[] args ) {
              Runnable doEDT = new Runnable() {
                   public void run() {
                        new TestScrollableFlowPanel();
              SwingUtilities.invokeLater( doEDT );
         public TestScrollableFlowPanel() {
              try {
                   jbInit();
              } catch ( Exception e ) {
                   e.printStackTrace();
              this.setSize( 300, 300 );
              this.setDefaultCloseOperation( EXIT_ON_CLOSE );
              this.setVisible( true );
         private void jbInit() throws Exception {
              ScrollableFlowPanel panel = new ScrollableFlowPanel();
              for ( int k = 0; k < 120; k++ )
                   panel.add( new JButton( "Button"  + k ) );
              JScrollPane scroll = new JScrollPane( panel );
              this.getContentPane().setLayout( new BorderLayout() );
              this.getContentPane().add( scroll, BorderLayout.CENTER );
         static public class ScrollableFlowPanel extends JPanel implements Scrollable {
              public void setBounds( int x, int y, int width, int height ) {
                   super.setBounds( x, y, getParent().getWidth(), height );
              public Dimension getPreferredSize() {
                   return new Dimension( getWidth(), getPreferredHeight() );
              public Dimension getPreferredScrollableViewportSize() {
                   return super.getPreferredSize();
              public int getScrollableUnitIncrement( Rectangle visibleRect, int orientation, int direction ) {
                   int hundredth = ( orientation ==  SwingConstants.VERTICAL
                             ? getParent().getHeight() : getParent().getWidth() ) / 100;
                   return ( hundredth == 0 ? 1 : hundredth );
              public int getScrollableBlockIncrement( Rectangle visibleRect, int orientation, int direction ) {
                   return orientation == SwingConstants.VERTICAL ? getParent().getHeight() : getParent().getWidth();
              public boolean getScrollableTracksViewportWidth() {
                   return true;
              public boolean getScrollableTracksViewportHeight() {
                   return false;
              private int getPreferredHeight() {
                   int rv = 0;
                   for ( int k = 0, count = getComponentCount(); k < count; k++ ) {
                        Component comp = getComponent( k );
                        Rectangle r = comp.getBounds();
                        int height = r.y + r.height;
                        if ( height > rv )
                             rv = height;
                   rv += ( (FlowLayout) getLayout() ).getVgap();
                   return rv;
    }: jay

  • ScrollPane problem - scrollbars not updated after child rescaling

    Hi.
    Here is a simple application using a ScrollPane to display a large circle. Initially everything looks fine but when you use zoom in and zoom out buttons ScrollPane doesn't update the scrollbars. Scrollbars are only updated after you try to scroll. Even worse - if you zoom out a couple of times, scrollbars dissapear. If you then zoom in again scrollbars will only reappear if you resize the stage main window.
    Is there something else I should do in addition to rescaling the circle node?
    Thanks for your help.
    package test2;
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.ScrollPane;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.layout.HBox;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Circle;
    import javafx.scene.transform.Scale;
    import javafx.stage.Stage;
    public class App2 extends Application {
         @Override
         public void start(Stage stage) throws Exception {
              final Scale scale = new Scale(1,1);
              final Circle circle = new Circle(100,100,500, Color.BLUEVIOLET);
              BorderPane border = new BorderPane();
              ScrollPane scroll = new ScrollPane();
              circle.getTransforms().add(scale);
              scroll.setNode(circle);
              Button zoomin = new Button("+");
              Button zoomout = new Button("-");
              zoomin.onActionProperty().set(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        scale.setX(scale.getX()*2);
                        scale.setY(scale.getY()*2);
              zoomout.onActionProperty().set(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        scale.setX(scale.getX()/2);
                        scale.setY(scale.getY()/2);
              HBox top = new HBox(5);          
              top.getChildren().addAll(zoomin, zoomout);
              border.setTop(top);
              border.setCenter(scroll);
              Scene s = new Scene(border,500,500);
              stage.setScene(s);
              stage.setVisible(true);
        public static void main(String[] args) {
            Application.launch(args);
    }

    Hi,
    see this thread maybe you find something helpful.
    javafx.scene.Group "auto-size" doesn't work in my case

  • Scrollpane stopps working when loaded in swf

    Hi,
    Hoping someone can help with this issue. I have a nice
    scrollpane with easing that works fine when on its own, but when
    loaded into another swf the scroll action stops working.
    I have tried the _lockroot action on the swf to be loaded but
    that seems to stop it working also.
    This is the code:
    txt.setMask(mask);
    scrollbar.onMouseDown = function() {
    if (this.hitTest(_root._xmouse, _root._ymouse) &&
    txt._height>mask._height) {
    this.startDrag(false, scrollbarBG._x, scrollbarBG._y,
    scrollbarBG._x, scrollbarBG._height-this._height)
    txt.onEnterFrame = scrollThumbs;
    dragging = true
    scrollbar.onMouseUp = function() {
    stopDrag()
    dragging = false
    delete this.onEnterFrame;
    function scrollThumbs() {
    var funkyVar =
    -this._parent.scrollbar._y*(((this._height-this._parent.scrollbar._height)/(this._parent. scrollbarBG._height-this._parent.scrollbar._height))-1)
    this.Y = (funkyVar-this._y)*.2;
    this._y += this.Y;
    if(Math.abs(funkyVar-this._y)<1 && !dragging){
    delete this.onEnterFrame
    Help is appreciated, this is driving me mad!!
    Cheers,
    Pat

    You should not nest named functions... a source of problems waiting to happen.  You should go into your Publish settings and select the Permit Debugging option in the Flash section.  That could provide more specific information regarding the source of the error, such as a line number.  I haven't read thru your code beyond a glance, but where you are using e.target in mouse event handler functions, you should try using e.currentTarget instead.

  • Controling browser scrollbars when MC changes height?

    Is there a way to have the browser scrollbars show up when a
    MovieClip's height increases ?

    if you want to use the swfobject to resize the browser
    window, download the swfobject.js javascript file and put it in the
    same directory with your swf's html page and read about how to
    embed your swf using it.
    you can then call the resizeSWF() function (passing the new
    height parameter causing the browser window to increase in height
    and displaying scrollbars, if they are needed) by using the
    externalinterface class:

  • Show vertical scrollbar when 1D array only shows one element

    When showing only one element of one dimensional array, only the horizontal scrollbar can be displayed.  The vertical scrollbar visible option is greyed out.  Even using property nodes does not make it visible.  I have an array of clusters with many controls in each cluster that are aranged hozizontally across the front panel.  I'd like the user to see only one element (one set of controls) at a time and be able to scroll through them using a vertical scollbar.

    I think Brent's suggestion is very good.  Another hack would be to cover the additional array elements with a decoration so that you only see one element.
    Message Edited by vt92 on 04-21-2009 09:58 AM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
    Attachments:
    need to scroll.PNG ‏14 KB

  • Disable scrollbar when content is lower than viewport ?

    Hi,
    I have a vertical scrollbar always showed (JScrollPane.VERTICAL_SCROLLBAR_ALWAYS),
    but I want it to be disabled when the content in the viewport is lower than the viewport's height.
    Take for example Chrome browser in Windows: when u open up Google, the content of the page is quite low in height and the scrollbar in Chrome will be disabled. As soon as you have enough content on the page the scrollbar will be active.
    How can I achieve this ?
    Thanks

    Hello,
    It's not really a problem, I just realize it is a SWING limitation, (...)
    Almost all app have this behaviour; it isn't really nice visually.I don't have Chrome, and haven't seen this behavior anywhere so far (but admittedly, I'm way behind in terms of GUI fashion).
    The behavior that I'm used to (and that Swing designers apparently believed to be the norm too), is that a scrollbar disappears when the width of the view does not justify it ( SCROLLBAR_AS_NEEDED ). Using SCROLLBAR_ALWAYS implies that you want the scrollbar there, no matter whether the view's width deserves it. How the scrollbar looks in this case sounds like a Look and Feel choice instead (I only have oldish OSs, but maybe you know an Operating System where this behavior is the norm? In this case yes, it is a limitation of the corresponding Swing L&F).
    maybe there was some workaround.Considering this is not in the OS LAF, this can be "manually coded", by listeneing to resizing events and accordingly changing the scrollbar's appearance.
    Assuming the "disabled" scrollbar appearance is what you're after (no idea, it's just an example, if that doesn't suit your need you may do something else in the placeholder code), here is a, admittedly rather dense, workaround.
    Notice how the vertical and horizontal scrollbar looks different (I only applied the workaround to that latter).
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.event.ChangeEvent;
    import javax.swing.event.ChangeListener;
    public class TestDisableScrollBar extends JPanel
        private static final String SHORT_TEXT = "text";
        private static final String LONG_TEXT = "texttexttexttexttexttexttexttexttexttexttextte";
        private static void createAndShowGUI()
            JFrame frame = new JFrame("Demo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JTextArea textarea = new JTextArea(5, 5); // just to take up some space.
            final JLabel label = new JLabel(SHORT_TEXT);
            JPanel view = new JPanel();
            view.setLayout(new GridLayout(2, 1));
            view.add(label);
            view.add(textarea);
            final JScrollPane widget = new JScrollPane(view, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
            widget.getHorizontalScrollBar().setEnabled(false);
            widget.getViewport().addChangeListener(new ChangeListener() {
                public void stateChanged(ChangeEvent e) {
                    widget.getHorizontalScrollBar().setEnabled(
                            widget.getViewport().getWidth()<
                            widget.getViewport().getView().getWidth());
            frame.getContentPane().add(widget, BorderLayout.CENTER);
            JButton alternateText = new JButton("Switch width");
            alternateText.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    label.setText(label.getText().equals(SHORT_TEXT)?
                        LONG_TEXT : SHORT_TEXT);
            frame.getContentPane().add(alternateText, BorderLayout.SOUTH);
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
      }

  • Cuatom Forms: Loosing the Vertical scrollbar when resizing the Window

    Hi All
    I have developed a Custom Form. In that there is a Content Canvas and on the top of that I have put a Stacked Canvas so that i can get both the Horizontal and Vertical scrollbars. the form has more than 40 fields to display.
    Folder tool functionality has also been added to the Form.
    The form works absolutely fine and scrollbars too.
    But when I am resizing the window (making the window size bigger or smaller by dragging the window on the Oracle Apps screen), at that time I am loosing the vertical Scrollbar. Other than Vertical scrollbar everything works fine.
    Is there any way (any code) by which the Vertical Scrollbar will not disappear.
    I would really appreciate if any one could guide me on this.
    Thanks
    Madhu

    Madhu,
    Please post your message in the Oracle E-Biz forum. This forum is for Non-EBS Forms development and everyone here may not have EBS Forms development experience.
    That having been said, I encountered this about a year ago. If I remember correctly, we were able to resolve the issue by applying a Forms server patch to the Apps Tech stack. Please check Metalink to verify.
    Craig...

  • Dreamweaver CS5.5 Slow down when minimising and loading pages.

    Hi there
    I'm having a really strange problem with Dreamweaver CS5.5
    I'm currently in the process of building a CMS for a client and I am experience slow down in Dreamwever when opening and closing certain pages, it also causes slow down/hanging when opening and minimising Dreamweaver itself if these certain pages are open at the time. Which starts to get very annoying when you're swapping between Photoshop and Dreamweaver all the time...
    I narrowed it down to a CSS file causing the slow down/hanging. This being the main stylesheet for the CMS... admin.css
    When I comment out the CSS file Dreamweaver minimises and maximises quickly, and the page in question opens fast.
    The stylesheet is about 900 lines long at the moment, but I've got php and javascript files (and also other CSS files) which are much longer and none of them cause slow down/hanging.
    I've looked myself but from what I can see all of the CSS is valid.
    Any ideas guys?
    Thanks in advance

    I can't explain this at all, but I've solved it.
    I changed the style below:
    @media only screen and (min-width: 35em) {
    .ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; }
    .ir br { display: none; }
    .hidden { display: none !important; visibility: hidden; }
    .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
    .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
    .invisible { visibility: hidden; }
    /* Clear Floated Elements + Fix */
    .clear {clear:both; display:block; overflow:hidden; visibility:hidden; width:0; height:0;}
    .clearfix:before,.clearfix:after{content: '.'; display: block; overflow: hidden; visibility: hidden; font-size: 0; line-height: 0; width: 0; height: 0;}
    .clearfix:after {clear: both;}
    .clearfix {zoom: 1;}
    /*END DONT CHANGE*/
    To this:
    @media only screen and (min-width: 35em) {
    .ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; }
    .ir br { display: none; }
    .hidden { display: none !important; visibility: hidden; }
    .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
    .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
    .invisible { visibility: hidden; }
    /* Clear Floated Elements + Fix */
    .clear {clear:both; display:block; overflow:hidden; visibility:hidden; width:0; height:0;}
    .clearfix:before,.clearfix:after{content: '.'; display: block; overflow: hidden; visibility: hidden; font-size: 0; line-height: 0; width: 0; height: 0;}
    .clearfix:after {clear: both;}
    .clearfix {zoom: 1;}
    /*END DONT CHANGE*/
    Moved it outside of the media query. It was put there by mistake by the looks of it.

  • How to avoid multiple scrollbars when placing multiple lists in a vbox ?

    Hi All ,
    Am using a flex application using flex builder 3 ...
    I need to display multiple lists one below the other with no scroll bars for the list with only the outer scrollbar visible.
    In other words , each list must display all of its children with no scroll bar. If i set the vertical scroll bar to "off" ,
    it just removes the vertical scrollbar so that the user is not able to scroll the list (rest of the children are not visible)
    I have attached a sample application to illustrate the problem I face right now....
    When the following application is run ,
    Present Behavior:
    2 scrollbars are visible , the outer vbox scrollbar and the inner list scrollbar(for each scrollbar)
    Expected Behavior:
    1 scrollbar should only be visible ie. the outer vbox scrollbar.
    Each list should display all of its children with no scrollbars.
    Application code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalScrollPolicy="off">
    <mx:VBox  width="40%" height="600" verticalScrollPolicy="on">
       <mx:List dataProvider="{dataProviderArray1}" width="100%" />
       <mx:List dataProvider="{dataProviderArray2}" width="100%" />
       <mx:List dataProvider="{dataProviderArray1}" width="100%" />
           <mx:List dataProvider="{dataProviderArray2}" width="100%" />
           <mx:List dataProvider="{dataProviderArray1}" width="100%" />
           <mx:List dataProvider="{dataProviderArray2}" width="100%" />
    </mx:VBox>
        <mx:ArrayCollection id="dataProviderArray1">
            <mx:source>
                <mx:Object label="A............" data="1"/>
                <mx:Object label="B............" data="2"/>
                <mx:Object label="C............" data="3"/>
                <mx:Object label="A............" data="1"/>
                <mx:Object label="B............" data="2"/>
                <mx:Object label="C............" data="3"/>
                <mx:Object label="A............" data="1"/>
                <mx:Object label="B............" data="2"/>
                <mx:Object label="C............" data="3"/>
                <mx:Object label="A............" data="1"/>
                <mx:Object label="B............" data="2"/>
                <mx:Object label="C............" data="3"/>           
            </mx:source>
        </mx:ArrayCollection>
        <mx:ArrayCollection id="dataProviderArray2">
            <mx:source>
                <mx:Object label="D............" data="3"/>
                <mx:Object label="E............" data="4"/>
                <mx:Object label="F............" data="5"/>
                <mx:Object label="D............" data="3"/>
                <mx:Object label="E............" data="4"/>
                <mx:Object label="F............" data="5"/>
                <mx:Object label="D............" data="3"/>
                <mx:Object label="E............" data="4"/>
                <mx:Object label="F............" data="5"/>
                <mx:Object label="D............" data="3"/>
                <mx:Object label="E............" data="4"/>
                <mx:Object label="F............" data="5"/>
            </mx:source>
        </mx:ArrayCollection>  
    </mx:Application>

    Hello,
    If you know the length of dataprovider and can specify the height in pixels for each list, then below mentioned code may help:
         <mx:Canvas width="40%" height="100%" horizontalScrollPolicy="off">
            <mx:List id="l1" dataProvider="{dataProviderArray1}" width="100%" height="500"   />
            <mx:List id="l2" y="{l1.y + l1.height  + 5}" height="300" dataProvider="{dataProviderArray2}" width="100%" />
            <mx:List id="l3" y="{l2.y + l2.height  + 5}" height="300" dataProvider="{dataProviderArray1}" width="100%"/>
            <mx:List  id="l4"  y="{l3.y + l3.height  + 5}" height="300" dataProvider="{dataProviderArray2}" width="100%" />
            <mx:List  id="l5" y="{l4.y + l4.height  + 5}" height="300" dataProvider="{dataProviderArray1}" width="100%" />
            <mx:List  id="l6" y="{l5.y + l5.height  + 5}" height="300"  dataProvider="{dataProviderArray2}" width="100%" />
         </mx:Canvas>
    Tanu

  • Vertical scrollbar when you start program

    hello,
    where do I set up when the program starts to show a vertical scrollbar?
    front panel is higher than the monitor and I do not see the whole FP.
    Thanks,
    Peter

    Use Maximize property, it will fit your FP according to screen resolution.
    Use Vertcal scrollbar property, set it to true or else go into VI properties>> Window appearance and select "Show vertical scrollbar"
    Gaurav k
    CLD Certified !!!!!
    Do not forget to Mark solution and to give Kudo if problem is solved.

  • Reposition scrollbar when updating JList

    I'm not sure how to approach this problem. I have a JList which resides in a JScrollPane. This list is updated every few seconds with setListData(). The list only has 5 viewable items so the user must scroll to see any additional. However when the list is updated it causes the Scrollbar (Knob) to reset to the top position. Forcing the user to scroll down every few seconds to see the additional items. I'm looking for a way to reposition the the view to the users last scrolled position. Or get the scrollbar to ignore the refresh and remain at the previous position.
    Any thoughts?

    Theres still some inconsistentency with it. But youfolks set me on the right track.
    Does that mean it works or it doesn't work?
    Sometimes you need to wrap methods in a
    SwingUtilties.invokeLater() to make sure the code
    gets execute in the correct order. So you can try
    wrapping the ensureIndexIsVisible(..) method to make
    sure it executes after all the code invoked by the
    setListData() method.Well I think what I've done is crafted a well hidden bug in my code. Using ensureIndexIsVisible() will properly position the scroll bar for a random number of setListData() cycles. Then the scrollbar returns to the top. I think I may be inadvertantly setting another or an invalid index.

  • AS3 - change width of ScrollBar / ScrollPane's scrollbar

    Is there any way to change the width of the AS3 scrollbar
    component? I've tried changing the width of the skin, but it always
    snaps to the default width.

    I'm not sure if the original poster found an answer for this
    one, but I thought I'd post this link here, as I found the answer
    to this question astoundingly difficult to find
    http://www.gskinner.com/blog/archives/2007/05/variable_scroll.html
    Basically, you need to download the new class definition
    gskinner has written and let it override the adobe provided ones.
    This new class gives you some more styles to control scrollbar
    width and arrow height.

Maybe you are looking for

  • Error saving purchase order data decimal values in SAP R/3

    sir, PO was created with currency japanese YEN using Tcode ME21N . The net price was showing 142502300 (in JPY). when checked in EKPO table , it saved with a value 1425023.00  instead of  142502300 .  what can be done to correct this.       In PO Pri

  • B2B integration with just one trading partner using a dedicated VPN channel

    Hi colleagues, We are working in a B2B integration escenario, where our company will just integrate with a service provider using a dedicated VPN channel, so we won't go out to internet, for that B2B communication we have identified 10 inbound + 9 ou

  • RoboHelp for word 6

    I am using RoboHelp 6 for Word, Window2000 and MS Word 2000. When I start a new project, I choose WebHelp project type. I look at the "Welcome" topic, I get 0.08" margin from the left. I go to the style to change to 0". But as soon as I build the pro

  • What is the Bluray Stream option for in Mpeg2 preset?

    I just noticed by accident that in the mpeg2 preset quality tab when I clicked the SD DVD drop-down box that there is an option to create a bluray stream. Am I correct to assume therefore that it is possible to create a bluray mpeg2 file direct from

  • Why isn't Photoshop Elements showing up in my upgrades list?

    With the new version of Photoshop Elements in the store, I checked my available updates but there isn't an update listed. When I look at the purchased list and click on the application to go to its page, it just responds "Your request could not be co