How to synchronize two scroll bars

Hi there,
Can anyone tell me how to go about to synchronize 2 JScrollPanes so that When the Scroll bar of the top Pane is moved, the scrollPane of the bottom pane also moves in sync. Thanks in advance.

1. get hold of the two scrollbars using getHorizontalScrollBar() or getVerticalScrollBar()
2. listen to their AdjustmentEvents using
addAdjustmentListener(AdjustmentListener l)
3. in the AdjustmentListener set the scrollPosition
of the other scrollbar, when an AdjustmentEvent gets
fired. You can use setValue(int)
Spieler

Similar Messages

  • How to link one scroll bar with two dynamic text boxes.

    How to link one scroll bar with two dynamic text boxes.
    If i move scroll bar in one text box,automatically text will
    be moved in another text box.But scroll bar is not visible.
    Can you please help me.
    Thanks in advance.

    See the following article:
    JavaScript - setFocus Method for tabbing to next form field
    And see if iOS can even handle the sample form.
    iOS and android devices are not a powerful as your desktop of laptop computer and have limited support for JavaScript within PDF forms. This limitation for specific apps ranges from none to quite a bit but not all JavaScript.

  • How to synchronize two database in ur java program

    Hi All
    How to synchronize two data base of mysql using java programing language?
    If somebody has any idea that will help me a lot.
    Thanks and regards
    Srikant

    Of corse I have an idea, but not good!
    If you know the database stucture then copy data from one to another.
    Open 2 connections: one to source and one to dest.
    And:
    String sql = "SELCET * from mytable1";// from source
    string sql2;
    Statement st1 = connSrc.createStatement();
    Statement st2 = connDest.createStatement();
    ResultSet rs = st1.executeQuerry(sql);
    while(rs.next()){
    sql2 = "INSERT INTO mytable1 ('field1', 'filed2') VALUES ("+
    "'"+rs.get(filed1")+"',"+
    "'"+rs.get(filed2')+"'"+
    st2.executeUpdate(sql2);
    // the destination was cleared before this: DELETE FROM mytable1 WHERE 1
    This is a mysql sample without processing the errors.
    Szabi

  • How to make a scroll Bar with buttons

    Hi all,
    I am using Flash cs6 on an iMAC running 10.7.2
    I would like to know if anyone could please point me to a tutorial, showing "how to create a scroll bar with buttons". I am having a heck of a time finding a tutorial.
    Many thanks in advance.
    regards,
    DH

    http://learnola.com/2008/10/27/flash-tutorial-create-a-custom-scrollbar-with-actionscript/

  • How to add a scroll bar within a view window ?I want to display x and y axis outside the scoll window and keep those axis static and move the graph within scroll area

    how to add a scroll bar within a view window ?I want to display x and y axis outside the scoll window and keep those axis static and move the graph within scroll area
    ananya

    Hey Ananya,
    I believe what you want to do is possible, but it will not be
    easy.  If you want to add a scroll bar that will scroll the graph
    back and forth but keep the axis set, you would want to add a
    horizontal or vertical scrollbar.  Then you would create an event
    handler for the scroll event.  You would have to manually plot
    different data within this scroll event.  Unfortunately, there is
    not really a built in way to do this with the Measurement Studio plot
    control.
    Thanks,
    Pat P.
    Software Engineer
    National Instruments

  • How to get a scroll bar to the applications popup by default?

    How to get a scroll bar to the applications popup by default when clicked the applications folder from the dock? If I have so many applications that they do not fit in the default area, I have to find out myselft that I have to scroll the content before the scroll bar appears. This leads to "where is my missing applications questions" by the novice users with Mountain Lion.

    System Preferences > General > Show scroll bars.
    Click the button by the side of "Always".
    Best.

  • How to add the scroll bar in the vertical photo gallery?

    like this, how to add the scroll bar? http://www.flashvault.net/tutorial.asp?ID=288 Thanks,

    I want to know how to add a vertical scroll bar in the photo gallery which I copied from the tutorial. And add the event to catch MouseEvent.CLICK for each photo. Please advise. Thanks,

  • How do I get scroll bars to work

    I get a vertical scroll bar where I don't want one.  The horizontal one (see attachment) is needed as the form gets quite wide when it is in Spanish.  But despite turning off verticalScrollPolicy everywhere, one of them still appears.
    <mx:AddChild relativeTo="{bodyFormHolder}" position="firstChild">
    <mx:VBox id="resultsPageBox"
    backgroundColor="#dedacf"
    width="100%"
    height="100%"
    verticalScrollPolicy="off" horizontalScrollPolicy="off">
    <mx:HBox id="rAccessHBox"
        minWidth="640" width="100%"
        x="0" y="0">
    </mx:HBox>
    <!-- across top *********************************************** -->
    <!-- ********************************************************** -->
    <mx:VBox id="topResultBox"
        verticalScrollPolicy="off" horizontalScrollPolicy="off"
        width="100%"
        styleName="backColor" >
    </mx:VBox>
    <mx:HBox id="bothSides"
        verticalScrollPolicy="off"
        width="100%"
        height="100%">
        <!-- first column ***************************************** -->
        <!-- ****************************************************** -->
        <mx:VBox id="leftSideCanvas"
            verticalScrollPolicy="off"
            width="50%"
            height="100%"
            focusEnabled="false"
            styleName="backColor">
        </mx:VBox>
        <!-- second column **************************************** -->
        <!-- ****************************************************** -->
        <mx:VBox id="rightSideCanvas"
            verticalScrollPolicy="off"
            backgroundColor="#dedacf"
            y="0"
            width="50%"
            height="100%">
        </mx:VBox>

    A bigger question is how to get the scroll bars to work from the keyboard.  The problem is to be accessible, the application must be available to blind or physically handicapped people that can't use a mouse.
    To get the entire form read requires horizonal scrolling in some cases such as when it is in Spanish or the font size it increased a lot.  Now, a horizontal scroll bar appears and is easily movable via the mouse, but we have to have it move without a mouse.
    I found the vertical bar came from the form object and I eliminated that, but the bigger issue still remains.

  • How to synchronize two fpga DIO?

    Hi!
    I am using two FPGA 7962R (flexrio) with each 6581 terminal board in PXIe-1082 chassis. My problem is how to synchronize two 7962R digital output with PXIe-1082 chassis backplane signal Dstar* or Clk10 or DAQ signal.
    Actually I tried the synchronization with one DAQ counter clock (confering 'Gen Dig Pulse Train-Finite_NI. vi') , and get the signal PXI-Trig0 by source terminal and target terminal connection, but that one does not work properly. Especially, one trigger signal in HOST to set the starting point of each FPGA (7962R), make error by depending on the trigger signal value(Hz value and Timed loop clock in FPGA vi). It was very tricky and not reliable. (I am attaching figure files as explaining the situation)
    My aim is simply to use two FPGA 7962R Digital output as one FPGA, for controling X-axis, Y-axis with each FPGA, while able to change each FPGA (X-axis, Y axis) digital output value. Because the synchronization is not correct, X,Y axis control with Two FPGA currently is out of target if I use simply while-loop design in HOST and timed-loop design in FPGA vi. What is correct design to synchronize the two FPGA 7962R without using PFI line, only with PXIe-1082 chassis backplane signal and able to change the digital output value? Please let me know any idea for HOST vi, FPGA vi programming.
    Many Thanks
    Attachments:
    host1.png ‏47 KB
    fpga1.png ‏131 KB

    Posted response to this in the following thread:
    http://forums.ni.com/t5/Real-Time-Measurement-and/synchronization-two-fpga-7962r-digital-output/m-p/...
    Patrick H | National Instruments | Software Engineer

  • How to create 2 scroll bar in 2 canvas

    Hello All,
    I will appreciate if somebody knows how to create 2 scroll bars in 2 Content canvases and all items text item belongs to one data block.
    In data block property it shows only one scroll bar. Their is no property of scroll bar in canvas.
    Regards,
    Atif

    Go to the layout editor.
    Take the Stacked canvas tool in the toolbox
    draw a stacked canvas on the content canvas (the stacked can could be larger than the content one)
    edit you item properties to display on the content canvas
    adjust the window to the same width and weight properties than the content canvas.
    The simplest way it to use the datablock wizard to create the data block, then indicate to show items not on the content canvas but the stacked canvas.
    Francois

  • How to create simple scroll-bar table dashboard in Excel 2003?

    How to create simple scroll-bar table dashboard in Excel 2003?
    Pl mention from step 1 as I am new to this 

    Hi UltraDev,
    We discuss SQL Server PowerPivot for SharePoint related issue in this forum. In your case, I suggest you post the question in the following forum for better support:
    Excel IT Pro Discussion:
    http://social.technet.microsoft.com/Forums/office/en-US/home?forum=excel
    Regards,
    Elvis Long
    TechNet Community Support

  • How to get a scroll bar for nodes?

    How to get the scroll bar to work with the javafx.scene.layout.container.
    I tried putting in one but the SwingScrollPane requires SwingComponent.
    How do I put my fx nodes inside it.
    I could not find any way to cast the node objects into SwingComponent.

    Hi,
    Here's a little sample with custom scrollNode
    You must modify the code but you can start with it.
    * ScrollNode.fx
    * Created on 14 mars 2009, 14:53:55
    package fxtests;
    import fxtests.ScrollNode;
    import java.lang.Object;
    import javafx.ext.swing.SwingSlider;
    import javafx.scene.CustomNode;
    import javafx.scene.Group;
    import javafx.scene.Node;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.LinearGradient;
    import javafx.scene.paint.Stop;
    import javafx.scene.Scene;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.text.Text;
    import javafx.stage.Stage;
    import javafx.scene.text.TextOrigin;
    * @author Alex
    public class ScrollNode extends CustomNode {
        public-init var node: Node;
        public-init var nodeWidth: Number;
        public-init var nodeHeight: Number;
        public var scrollHeight = 20;
        public var width = 200;
        public var height = 200;
        public var posX: Integer = 0 on replace {
            node.translateX = -posX
        public var posY: Integer =
        nodeWidth - width as Integer on replace {
            node.translateY = posY-(nodeWidth - width)
        public override function create(): Node {
            return Group {
                content: [
                    SwingSlider {
                        value: bind posX with inverse
                        minimum: 0
                        maximum: nodeWidth - width as Integer
                        width: width
                        height: 20
                        translateX: 20
                        vertical: false;
                    SwingSlider {
                        value: bind posY with inverse
                        minimum: 0
                        maximum: nodeHeight - height as Integer
                        height: height
                        width: 20
                        translateY: 20
                        vertical: true
                    Group {
                        translateX: scrollHeight
                        translateY: scrollHeight
                        clip: Rectangle {
                            width: width
                            height: height
                        content: node
                    Text {
                        translateX: scrollHeight+10
                        translateY: scrollHeight+10
                        textOrigin: TextOrigin.TOP
                        content: bind "node position: {node.translateX}, {node.translateY}"
    function run() {
        Stage {
            title: "ScrollNode"
            scene: Scene {
                width: 400
                height: 400
                content: [
                    ScrollNode {
                        width: 200
                        height: 200
                        nodeHeight: 500
                        nodeWidth: 500
                        node: Rectangle {
                            width: 500
                            height: 500
                            fill: LinearGradient {
                                startX: 0.0
                                startY: 0.0
                                endX: 1.0
                                endY: 1.0
                                stops: [
                                    Stop {
                                        color: Color.WHITE
                                        offset: 0.0
                                    Stop {
                                        color: Color.BLACK
                                        offset: 1.0
    }

  • How to make a scroll bar!!!

    i need to know how to make a scroll bar in flash cs3! can
    anyone help me with this??

    http://learnola.com/2008/10/27/flash-tutorial-create-a-custom-scrollbar-with-actionscript/

  • Does anybody know how to get a scroll bar for a long list of podcasts when selcting some for sync? Thanks

    Does anybody know how to get a scroll bar for a long list of podcasts when selcting some for sync? Thanks

    Hi lbadek
    I can help with this please send us an email using the contact the mods link in my proifle and we will investigated from there.
    Thanks
    Stuart
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • How to get Auto scroll bar in a JSP?

    Hi Gurus,
    I have created a custom jsp page in a B2B application. How to get the auto scroll bar when page is exceeded than it can display?
    Is there any specific tag or div which is to be included to get this scroll bar?
    Thanks a lot in advance!!
    Regards,
    Lakshman.

    Hi Lakshman,
    You can include it in stylsheet and then use that class in your <body> or "div"  tag.
    the CSS command is
    overflow:auto;
    you can use like
    <body style="overflow: auto;"> or -- div style="overflow: auto;" 
    You can declare class in ".css" file
    #c1
    .c1
    <body id="c1>> or <div id="c1">
    <body class="c1>> or <div class="c1">
    You can use either "class" or "id" by adding it to "CSS" file and the use it to any JSP file or by direct aditing "Style" attirbute in tag.
    so when your content is longer then your screen browser will display scroll bar automatically.
    I hope this will help you.
    Thanks and Regards.
    eCommerce Developer
    Edited by: Ecommerce Developer on Jul 9, 2009 5:58 PM
    Edited by: Ecommerce Developer on Jul 9, 2009 5:59 PM

Maybe you are looking for

  • How do I stop images when selected in Bridge from automatically opening in ACR?

    For no reason that I can think of, When I click on a single image in Bridge to preview or to try and select multiple images to load as layers or merge to HDR, the first image clicked opens in ACR. How can i Stop this?

  • Fault message in synchronous scenario

    I defined an integreationprocess with synchronous send step and an exception branch. And I specified an exception for a fault message which I defined in the synchronous interface. My problem is, that the exception is not triggered by application erro

  • Performance of WITH query.

    Hi All, I have a WITH query (inline view) and when I run it against my pre-production database (millions of rows) it hangs and never comes back. However, when I run it on my development database (just a few rows), it comes back fairly quickly. So cle

  • AFP Mount Error -5002

    Something broke recently and I'm struggling to figure out what may have happened... When logging into client machines (that have been bound to the server) the server appears in the Finder sidebar under "Shared" as usual. But when clicking on the serv

  • My firefox reset the connection while uploading Persona

    When uploading a persona to the site it loads the page for about 2 minutes and after that it says the connection has been reset because the page took too long to load... Is there anyway of getting round this so I can upload my persona, which in total