Aslan986
Aslan986

Reputation: 10314

Expand a JPanel as large as possible

I have a JTabbedPane, in which I insert an extension of JPanel, in which I insert a JSplit.

My problem is that the Panel auto-set to the smallest dimension possible, the one that is just enough to draw the inner components, as in the picture. aaaa

Instead, I would like to have it as large as possible.

Can you help me with this?

Upvotes: 0

Views: 178

Answers (2)

YROjha
YROjha

Reputation: 782

set JPanel layout null and add other componenets with required size. Hope it will work!

Upvotes: -1

MadProgrammer
MadProgrammer

Reputation: 347184

Make sure that the component that makes up the tab is using a BorderLayout, by default JPanel uses a FlowLayout

Upvotes: 2

Related Questions