Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Joe Ess
  • salvin francis
  • fred rosenberger

JSplitPane and DividerLocation

Ranch Hand
Posts: 18944
  • Mark post as helpful
  • 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
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.
Ranch Hand
Posts: 396
  • 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.
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.

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

hope this'll solve ur problem
Posts: 12
  • 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.
We can fix it! We just need some baling wire, some WD-40, a bit of duct tape and this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!