jsplitpane

Making a JPanel manually resizable

I have a JFrame with BorderLayout as the layout manager. In the south border, I have a JPanel, I want this JPanel's size to be adjustable by the user, i.e. the user can click on the edge of the border and drag it up to make it larger. Is there any way you know that I can do this? ...

alternatives/improvements to JSplitPane

I had a fairly simple dialog with a pair of JPanels of roughly equal size, contained in a JSplitPane. Now I'm looking at adding a 3rd JPanel and I'm not so sure there is an obvious solution. Is there a good window-docking framework out there? or is that a horribly complex thing to get into? If I do just stick with the 3-panel split, do I...

JSplitPane resize behavior

I have a vertically split JSplitPane and when I move the divider down, it shifts the bottom component and the bottom gets cut off. Is there a way to specify the resize behavior of a JSplitPane so the top (of the bottom component) gets covered by the split pane and the bottom is the last thing to get covered? thanks, Jeff ...

JSplitPane SetDividerLocation Problem

I have a JSplitPane which when shown should split the pane by 50%. Now on giving an argument of 0.5 (as suggested) to setDividerLocation, Java seems to treat it as a normal number instead of a percentage. As in, the divider, instead of going to the middle of the pane, is almost at the start of the left pane (the pane is vertically split...

How to implement JSplitPane in the BorderLayout?

HI, how can i use the JSplitPane so that they show up in the borders of a BorderLayout??? So that i can resize each sise (NORTH, EAST, WEST, SOUTH, CENTER). Thanks ...

How to set BackGround color to a divider in JSplitPane

I have created a divider in JSplitPane. I am unable to set the color of divider. I want to set the color of divider. Please help me how to set color of that divider. import javax.swing.*; import java.awt.*; import java.awt.event.*; public class SplitPaneDemo { JFrame frame; JPanel left, right; JSplitPane pane; int last...

BorderLayout problem with JSplitPane after adding JToolbar (Java)

Hello all. Problem: My program layout is fine, as below before I add JToolbar to BorderLayout.PAGE_START Here's a screenshot before JToolbar is added: Here's how it looked like after adding JToolbar: May I know what did I do wrong? Here's the code I used: //Create the text pane and configure it. textPane = new JTextPane()...

hide one part of JSplitPane in Applet

Here is my situation, i want to implement a sidebar on the right side of a JFrame. The sidebar is hidden in default, appear if i click a button. In order to hide the sidebar, I set the divider location of the JSplitPane with a very large value, say 10000. It works properly in normal java application. Also, i set the setResizeWeight of ...

jsplitpane in netbeans

Hi, I am trying to use a JSplitPane in Netbeans 6.9.1, but I can not configure it properly for some reason. E.g. I add a jtree and a jtable in a jframe. Then I use "enclose in splitpane". Then I set the orientation to vertical (from horizontal). Problem, when I try to adjust the divider location, I can not place it where I want. Either ...

How to disable JSplitPane arrow button

Hi, How do I disable(grey-out) the arrow button on the JSplitPane. I do know how to get the button from BasicSplitPaneDivider like this: final int UP_ARROW = 0; final BasicSplitPaneUI ui = (BasicSplitPaneUI) splitPane.getUI(); final BasicSplitPaneDivider divider = ui.getDivider(); final JButton upArrowButton = (JButton) divider.getComp...

Using JSplitPane with an AWT component

I have an AWT canvas which I cannot convert to a Swing component (it comes from VTK). I wish to display a few of these canvases inside of a JSplitPane. I've read about mixing heavy and light weight components in Java and know that it's a pain in the butt, but I don't have a choice. If I wrap the AWT canvas inside of a JPanel and then ...