Results 1 to 4 of 4

Thread: JSplitPane Problems

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    UK
    Posts
    222

    JSplitPane Problems

    Hello

    I'm having probelms with jSplitPanes

    I set them up and set the left and right, or top and bottom components, however when the screen actually laods and paints itself the actuall splits are either at the top or to the left, and using the setDividerLocation(0.75) dosen't have any effect,

    am i doing something silly, is there another command i should be using pre or post or is there another way of ensuring that the splits start in the place i want?!

    Cheers in advance

    Andy

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    You're probably experiencing this:
    If the split pane is not correctly realized and on screen, this method will have no effect (new divider location will become (current size * proportionalLocation) which is 0).
    From the JSplitPane.setDividerLocation(double) docs.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    UK
    Posts
    222
    thats the one, i've re-arranged my code and set the divider locations after they are visible, which is not what i wanted, but will have to do.

    From everything i've read about it it seems it sbeen around since 1.1 and Sun haven't seen fit to repair it!

    Ahh well

    Cheers!

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    You can always use setDividerLocation(int), it works on invisible widgets too.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

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



Click Here to Expand Forum to Full Width