Jsplitpane in netbeans?

If you want them the other way around just swap places of the tree and table before you choose to enclose them in a JSplitPane. Having said that it would not surprise me if NetBeans lets you choose the left/right components even after having done this As for the divider I'd normally use the setDividerLocation(Double location) method which takes a value between 0.0 and 1.0. This works as a percentage of where the divider should be located The method you are using setDividerLocation(intlocation) sets the absolute position in pixel values and I suspect that 5 is not really what you want.It also won't let you set the divider into a location that would make a component smaller than its preferred size and this is most certainly what happens when you set it to 5 So if your screen is 400 pixels high and you want to split it in the middle set the divider to 200 Recommended reading is How to Use Split Panes from the Java Tutorial trail.

If you want them the other way around just swap places of the tree and table before you choose to enclose them in a JSplitPane. Having said that it would not surprise me if NetBeans lets you choose the left/right components even after having done this. As for the divider I'd normally use the setDividerLocation(Double location) method which takes a value between 0.0 and 1.0.

This works as a percentage of where the divider should be located. The method you are using setDividerLocation(intlocation) sets the absolute position in pixel values and I suspect that 5 is not really what you want. It also won't let you set the divider into a location that would make a component smaller than its preferred size and this is most certainly what happens when you set it to 5.So if your screen is 400 pixels high and you want to split it in the middle set the divider to 200.

Recommended reading is How to Use Split Panes from the Java Tutorial trail.

If I place the tree on the left of the table and enclose, their places are swapped. If I place the table on left, they are swapped but they have the location I want. But why is this behavior?

Concerning the divisor location if I use the setDivider(double) as you say, the divisor is placed ok! But do you know why the layout works like that? I must place the components in last-comes first order or something in NetBeans?

Finally there is an option "change order" but it does not work for some reason. The components stay there. – user384706 Oct 14 '10 at 9:14 That seems to be the way NetBeans work, last comes first order :) Is everything fine now?

– willcodejavaforfood Oct 14 '10 at 9:16 Yes thank you. A final question. Do you use gui designers?

Am I correct to use one? – user384706 Oct 14 '10 at 9:52 @user384706 - Then please accept my answer as the correct one. When I started programming Swing I used emacs and that way I think I learned a lot more doing everything by hand than using a GUI designer.

NetBeans is a very good GUI designer and I have used it a lot :) – willcodejavaforfood Oct 14 '10 at 9:56 "Do you use gui designers? Am I correct to use one? " a) No.

B) Not unless you are an expert of coding GUIs by hand. – Andrew Thompson Oct 14 '10 at 11:33.

I am trying to use a JSplitPane in Netbeans 6.9.1, but I can not configure it properly for some reason. I add a jtree and a jtable in a jframe. Then I use "enclose in splitpane".

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions