Results 1 to 5 of 5
  1. #1
    smitharavi is offline Member
    Join Date
    Dec 2010
    Posts
    10
    Rep Power
    0

    Default how to scroll 2 images at a time(synchronisation),both images are on different panels

    Hi All,

    I am developing a tool for image comparision.2 images will be placed on 2 different panels,with different scrollbars,if i move one scrollbar,other scrollbar should move automatically,can any one help me.


    Thanks in advance

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is online now Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,889
    Rep Power
    8

    Default

    Set the model of one of the JScrollPane's JScrollBar(s) to the model of the other JScrollPane's JScrollBar(s).

  3. #3
    smitharavi is offline Member
    Join Date
    Dec 2010
    Posts
    10
    Rep Power
    0

    Default how to set model

    how to set model of one JScrollPane to another JScrollPane

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is online now Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,889
    Rep Power
    8

    Default

    Quote Originally Posted by smitharavi View Post
    how to set model of one JScrollPane to another JScrollPane
    What have you tried? What did the API tell you?
    Java Code:
    scrollPane2.getVerticalScrollBar().setModel(scrollPane1.getVerticalScrollBar().getModel());

  5. #5
    smitharavi is offline Member
    Join Date
    Dec 2010
    Posts
    10
    Rep Power
    0

    Default Thanks lot biggest problem solved in seconds

    once again thanks

Similar Threads

  1. Can anyone help with Images???
    By agajantorayev in forum CLDC and MIDP
    Replies: 3
    Last Post: 12-11-2010, 06:45 PM
  2. Replies: 6
    Last Post: 07-28-2008, 06:04 PM
  3. how to extract the date n time from images
    By norazanita in forum New To Java
    Replies: 3
    Last Post: 06-20-2008, 05:45 PM
  4. images
    By amith in forum AWT / Swing
    Replies: 1
    Last Post: 05-20-2008, 10:54 AM
  5. images, panels and applets
    By jamesfrize in forum Java Applets
    Replies: 3
    Last Post: 03-20-2008, 04:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •