Board index » jbuilder » More than one button in a JtabbedPane

More than one button in a JtabbedPane


2003-10-27 11:41:31 PM
jbuilder12
Hi,
I'm trying to place three buttons at the bottom of a jtabbedpane (i.e.
apply, check, and cancel). The present layout is border layout and won't
let me place more than one button in the "SOUTH" position at the bottom. I
temporarily tried to invoke other layouts (i.e. gridbag) but if I do I get
warnings during compilation and when I run the 3 tabbed panes I've created
completely disappear. Is there someway I can get 3 buttons in the "SOUTH"
position in border layout (i.e. a button group perhaps - how would I create
one if this would work)? Any help would be very welcome.
regards
Tony.
 
 

Re:More than one button in a JtabbedPane

Set the layout to 'null'.
remove all 3 buttons in the left tree view window of jbuilder
Then go into the designer and add the buttons on the positions you want.
This should work.
you also can ommit the step with deleting the present buttons and select
them on the left component view in designer and the change size and
position. If you have methods attached this is the better way. If not, it is
easier to create new buttons.
Ralph
"Tony" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote

Hi,

I'm trying to place three buttons at the bottom of a jtabbedpane (i.e.
apply, check, and cancel). The present layout is border layout and won't
let me place more than one button in the "SOUTH" position at the bottom. I
temporarily tried to invoke other layouts (i.e. gridbag) but if I do I get
warnings during compilation and when I run the 3 tabbed panes I've created
completely disappear. Is there someway I can get 3 buttons in the "SOUTH"
position in border layout (i.e. a button group perhaps - how would I
create
one if this would work)? Any help would be very welcome.

regards

Tony.
 

Re:More than one button in a JtabbedPane

"Tony" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote

Hi,

I'm trying to place three buttons at the bottom of a jtabbedpane (i.e.
apply, check, and cancel). The present layout is border layout and won't
let me place more than one button in the "SOUTH" position at the bottom. I
temporarily tried to invoke other layouts (i.e. gridbag) but if I do I get
warnings during compilation and when I run the 3 tabbed panes I've created
completely disappear. Is there someway I can get 3 buttons in the "SOUTH"
position in border layout (i.e. a button group perhaps - how would I
create
one if this would work)? Any help would be very welcome.

You can setup nested panels and layouts and thus you maybe want to make use
of these composition capabilities. For example, where you try to place three
buttons to the south position of your jtabbedpane with border layout, place
instead another panel into that south position, which will then contain your
three buttons. Assign to that panel also a layout like border or horiz. flow
etc.
Your JBuilder online help system should give you the needed infos, look at
it's section entitled "Designing Applications with JBuilder" and it's
sub-sections.
-Valentino
 

{smallsort}

Re:More than one button in a JtabbedPane

Thankyou both for the quick replies, I'll try these out.
regards --- Tony.
<posted & mailed>
Tony wrote:
Quote

Hi,

I'm trying to place three buttons at the bottom of a jtabbedpane (i.e.
apply, check, and cancel). The present layout is border layout and won't
let me place more than one button in the "SOUTH" position at the bottom. I
temporarily tried to invoke other layouts (i.e. gridbag) but if I do I get
warnings during compilation and when I run the 3 tabbed panes I've created
completely disappear. Is there someway I can get 3 buttons in the "SOUTH"
position in border layout (i.e. a button group perhaps - how would I
create one if this would work)? Any help would be very welcome.

regards

Tony.
 

Re:More than one button in a JtabbedPane

Thanks for your advice Valentino, it was pretty straight forward to do in
Jbuilder design view.
Cheers --- Tony.
Valentino Kyriakides wrote:
Quote

"Tony" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
news: XXXX@XXXXX.COM ...
>
>Hi,
>
>I'm trying to place three buttons at the bottom of a jtabbedpane (i.e.
>apply, check, and cancel). The present layout is border layout and won't
>let me place more than one button in the "SOUTH" position at the bottom.
>I temporarily tried to invoke other layouts (i.e. gridbag) but if I do I
>get warnings during compilation and when I run the 3 tabbed panes I've
>created completely disappear. Is there someway I can get 3 buttons in the
>"SOUTH" position in border layout (i.e. a button group perhaps - how
>would I
create
>one if this would work)? Any help would be very welcome.
>

You can setup nested panels and layouts and thus you maybe want to make
use of these composition capabilities. For example, where you try to place
three buttons to the south position of your jtabbedpane with border
layout, place instead another panel into that south position, which will
then contain your three buttons. Assign to that panel also a layout like
border or horiz. flow etc.

Your JBuilder online help system should give you the needed infos, look at
it's section entitled "Designing Applications with JBuilder" and it's
sub-sections.

-Valentino
 

Re:More than one button in a JtabbedPane

Tony wrote:
Quote
Hi,

I'm trying to place three buttons at the bottom of a jtabbedpane (i.e.
apply, check, and cancel). The present layout is border layout and won't
let me place more than one button in the "SOUTH" position at the bottom. I
temporarily tried to invoke other layouts (i.e. gridbag) but if I do I get
warnings during compilation and when I run the 3 tabbed panes I've created
completely disappear. Is there someway I can get 3 buttons in the "SOUTH"
position in border layout (i.e. a button group perhaps - how would I create
one if this would work)? Any help would be very welcome.

regards

Tony.
Is the BorderLayout in a panel inside the JTabbedPane, or is the
BorderLayout the manager for a panel in which the JTabbedPane sits?
--
Tad Frysinger [TeamB]
 

Re:More than one button in a JtabbedPane

"Tad Frysinger [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
Tony wrote:

>Hi,
>
>I'm trying to place three buttons at the bottom of a jtabbedpane (i.e.
>apply, check, and cancel). The present layout is border layout and won't
>let me place more than one button in the "SOUTH" position at the bottom.
I
>temporarily tried to invoke other layouts (i.e. gridbag) but if I do I
get
>warnings during compilation and when I run the 3 tabbed panes I've
created
>completely disappear. Is there someway I can get 3 buttons in the
"SOUTH"
>position in border layout (i.e. a button group perhaps - how would I
create
>one if this would work)? Any help would be very welcome.
>
>regards
>
>Tony.
Is the BorderLayout in a panel inside the JTabbedPane, or is the
BorderLayout the manager for a panel in which the JTabbedPane sits?
Yes, you have to update the property layout for the JPanel, not the
JTabbedPane.
The hierarchy is JTabbedPane contains a component JPanel, and the JPanel has
"x" layout.
Rgds,
Mynor.
Quote

--
Tad Frysinger [TeamB]