Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2283
  • Last Modified:

how to freeze a divider in split pane

Hi, how do I freeze a divider in jsplitpane

I have set the minimum sizes for both components
but the problem is when the mouse is over the
divider the cursor changes to the drag arrow

How do I avoid this so that the divider looks disabled.
and the user cannot interact with it at all.

Right now it doesnot look disabled and you can still
move the divider to some extent.

Also  I tried setting this UI for my slider


javax.swing.plaf.metal.MetalSliderUI ui = new javax.swing.plaf.metal.MetalSliderUI();

     slider.setUI(ui);                              
        slider.updateUI()

but it gives me null pointer exception.

java.lang.NullPointerException

     at javax.swing.plaf.metal.MetalSliderUI.installUI(MetalSliderUI.java:71)

     at javax.swing.JComponent.setUI(JComponent.java:325)

     at javax.swing.JSlider.setUI(JSlider.java:239)


Any help?
0
sanjay_thakur
Asked:
sanjay_thakur
  • 4
  • 3
  • 2
  • +2
1 Solution
 
rkenworthyCommented:
Maybe this is too obvious, but why are you using JSplitPane at all if you want it disabled?
0
 
sanjay_thakurAuthor Commented:
well I have set one touch expandable property to true
in the split pane

The point is in the bottom component I have
graphs displayed so the user can see the
graph in the full screen by clicking on the uparrow
in the divider.

Since I need this property to toggle
between the screens I have used split pane
but I want to disable moving the divider.













0
 
objectsCommented:
If you disable the splitpane, then the one touch button also won't work.
Sounds like it's not a split pane you actually need, you'd be better off modifying your layout to toggle between screens.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
sanjay_thakurAuthor Commented:
hi ,

the problem is that based on a certain condition I set
onetouchExpandable property to true or false;
when it is false I want to freeze the divider.

Is there any way I can freeze the divider
because in this case I dont need one touch button
to work when I freeze the divider.

p.s:How would you toggle between the two screens
using layout?Can you please elaborate cause
I think It would be lot of work
to add one touch button functionality
manually using layout.

Thanks




0
 
MoondancerCommented:
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20180059.html
http://www.experts-exchange.com/questions/Q.20221686.html
http://www.experts-exchange.com/questions/Q.20234788.html
http://www.experts-exchange.com/questions/Q.20246190.html
http://www.experts-exchange.com/questions/Q.20256943.html
http://www.experts-exchange.com/questions/Q.20257803.html
http://www.experts-exchange.com/questions/Q.20257760.html
http://www.experts-exchange.com/questions/Q.20260496.html
http://www.experts-exchange.com/questions/Q.20263573.html
http://www.experts-exchange.com/questions/Q.20263541.html
http://www.experts-exchange.com/questions/Q.20266174.html
http://www.experts-exchange.com/questions/Q.20283765.html
http://www.experts-exchange.com/questions/Q.20288327.html
http://www.experts-exchange.com/questions/Q.20291180.html
http://www.experts-exchange.com/questions/Q.20291602.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20155817.html
http://www.experts-exchange.com/questions/Q.20169826.html

*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations if this item remains inactive another seven (7) days.  If you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643 
POINTS FOR EXPERTS awaiting comments are listed here -> http://www.experts-exchange.com/commspt/Q.20277028.html
 
Moderators will finalize this question if in @7 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange
0
 
sanjay_thakurAuthor Commented:
Hi

I would like to close this question
cos I didnt get the solution to this

If I need to do a design change it is not the solution
to the problem

Thanks a lot for all the help everyone
0
 
MoondancerCommented:
25 points refunded, this item closed.

Moondancer - EE Moderator
0
 
objectsCommented:
Strange you accepted a design change on a another question?

http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20263541
0
 
MoondancerCommented:
Listening as well, in case an adjustment is apropos.
Moondancer - EE Moderator
0
 
sanjay_thakurAuthor Commented:
I dont get it
If I accept a design change in one issue
Do I need to accept it for everything else

That was dealing with Tabbed Panes
This is regd Split Pane

There is a difference I presume

Thanks for all the help though
0
 
pinzgiCommented:
Hi sanjay_thakur,
Did you find noq a solution or not? Changing the design is not the solution ... maybe if you have a looooooot of time and money doesn't metter in a project. In all other cases  I agree with you.
So do you have a solution?
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now