Solved

how to freeze a  divider in split pane

Posted on 2001-09-07
11
2,147 Views
Last Modified: 2007-12-19
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
Comment
Question by:sanjay_thakur
  • 4
  • 3
  • 2
  • +2
11 Comments
 
LVL 3

Expert Comment

by:rkenworthy
ID: 6465378
Maybe this is too obvious, but why are you using JSplitPane at all if you want it disabled?
0
 
LVL 4

Author Comment

by:sanjay_thakur
ID: 6465579
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
 
LVL 92

Expert Comment

by:objects
ID: 6465935
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Author Comment

by:sanjay_thakur
ID: 6469068
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
 
LVL 1

Expert Comment

by:Moondancer
ID: 6956135
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
 
LVL 4

Author Comment

by:sanjay_thakur
ID: 6961052
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
 
LVL 1

Accepted Solution

by:
Moondancer earned 0 total points
ID: 6961083
25 points refunded, this item closed.

Moondancer - EE Moderator
0
 
LVL 92

Expert Comment

by:objects
ID: 6961134
Strange you accepted a design change on a another question?

http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20263541
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6961189
Listening as well, in case an adjustment is apropos.
Moondancer - EE Moderator
0
 
LVL 4

Author Comment

by:sanjay_thakur
ID: 6966259
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
 

Expert Comment

by:pinzgi
ID: 8688395
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jdbc error in jsp application 20 71
Unhandled exception type Exception 18 52
learn programming 8 66
netbeans can not run self signed app 8 7
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question