Hi,
I have a problem with JSplitPane in my Gui. The problem is, I added a tabbedPane on the right Pane and added a table on the left Pane. The split pane displays in the whole window of my Gui. I want to give some heading above the split pane. I tried splitpane.setBounds() method. But the view of Gui is not changed, i.e., I need some space above the splitpane to give heading.
I have attached the related pieces of code:
sanjay kams, you didn't reply to the responses on your two earlier threads. When people offer free advice on a forum, it's nice to know whether the advice was helpful and whether your problem was solved.
As to your question, you need to learn how to use layout managers effectively.
@m Korbel: I don't think that's related to the question asked here. It's just incidental (and irrelevant) that one of the components in the layout is a JSplitPane.
luck, db
There are no new questions, but there may be new answers.
sanjay kams
Greenhorn
Joined: Jun 21, 2012
Posts: 5
posted
0
sorry. The problem is not solved. Still the Gui displays as like before.
Actually what I did is, I designed a Gui form like, created a Panel - added another one panel on it. Then added two Labels on the top of Panel, below the labels, added a Tabbed Pane(jtbGeneral) on the left side of Panel and added a table(DetailsJPanel) on the right side of Panel. I Designed the form like this.
You still haven't gone through the links I suggested.
sanjay kams
Greenhorn
Joined: Jun 21, 2012
Posts: 5
posted
0
Yes. I gone through it and got what I expected. Thanks a lot.
But while maximizing the Gui, the frame doesn't expands. Still its in minimized size only. I tried the component's setMaximumSize() also. But it not works. Any other way to do this? Please suggest me.
You shouldn't need to set any of preferred/max/min sizes. To get better help sooner, post a SSCCE (Short, Self Contained, Correct (Compilable), Example) that demonstrates your layout problem. Note that not many members here are willing to attempt to analyze scarcely readable designer-generated code, so I suggest you code up your GUI manually.
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
> splitPane.setBounds(300, 300, 800, 1000);
based on the above line, you're either
a) using a null layout, in which case you deserve the problem you have
b) have very little idea how layoutManagers work
either way, the layoutManager link (already supplied to you) has the answer.