Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSplitPane and DividerLocation

 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
I am just trying to create a SplitPane From JSplitPane and I want to set the DividerLocation first as
splitpane.setDividerLocation(0.5);
Then I want the Movable divider, But I am not able get that. Everytime my divider is at the left most position(I have taken the Horizontal Split. I don,t want to put any component on the splitPane initailly.
Can any one Help me.I urgrntly need it, This is very important for me.
Thanks a lot.
Kumud
 
deekasha gunwant
Ranch Hand
Posts: 396
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi kumud,
the problem is that u r using floating point value as the parameter. instead use some int between 0 and 750.
setDividerLocation(350);
coz the parameter which is passed represents the position in terms of pixels. so untill unless u'll use reasonably big value ur divider will remain at left sde only.
setDividerLocation

------------------------------------------------
public void setDividerLocation(int location)
Sets the location of the divider. This is passed off to the look and feel implementation.
Parameters:
location - an int specifying a UI-specific value (typically a pixel count)
------------------------------------------------

hope this'll solve ur problem
regards
deekasha
 
syed fazal faheem
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I got a similar problem, I have to hide the right part of the split pane. I am having the split pane in a dialog. My dialog size is 500,300. But if i set the divider location to 450 or 500, the divider gets positioned to the left hiding the left part of the pane.But it works fine for 400. But 100 pixels of space is visible at the right. I need to avoid this.
Please help me.
Thanks in advance.
fazal
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic