Resizing JSplitPane

I have a vertically split JSplitPane, and when I move the splitter down, it pushes the bottom component and the bottom is clipped. Is there a way to specify the resizing behavior of the JSplitPane so that the top (bottom component) is covered by the split pane, and the bottom is the last to be covered?

thank you jeff

+2


source to share


2 answers


The components are colored at the "(0,0)" position for each part of the split panel.

I think you could create your own custom UI that does whatever you want.



A simpler approach might be to add the component to the scrollbar. Then you can just specify scrollbars if needed.

Or, if you really only want the bottom of the component to be displayed, you can control the position of the viewport whenever the divider is moved. You can handle this by listening to the "dividerLocation" PropertyGhangeEvent.

+2


source


I think you might need to attach an event to the resize event JSplitPane

(I forgot what exactly he called). The event should then move the content as it sees fit.



0


source







All Articles