Solved

how to freeze a  divider in split pane

Posted on 2001-09-07
11
2,076 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
 
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

759 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now