Article View: borland.public.jbuilder.java.language
Article #19648Re: Adding/Removing panels at runtime.
From: Carl Hewitt
Date: Thu, 08 Jan 1998 00:00
Date: Thu, 08 Jan 1998 00:00
120 lines
4896 bytes
4896 bytes
This is a multi-part message in MIME format.
------=_NextPart_000_00CB_01BD1C64.68674E70
Content-Type: text/plain;
charset="iso-8859-7"
Content-Transfer-Encoding: quoted-printable
You may also want to look at using the CardLayout for this. That is =
what it was designed for.
Carl
John Papadomichelakis wrote in message =
<34B53E4D.547F9595@freemail.gr>...
Hi JBers.=20
I want to implement a wizard interface. My first thought was to use =
one window that will show, each time, the proper panel.=20
So.. I create a BevelPanel for each step I want to show, however I =
find difficult to display them.=20
Currently, what I am doing is:=20
WizardPanel newWizardPanel;=20
newWizardPanel =3D bp_main.goPreviousPage();=20
if(newWizardPanel!=3Dnull){=20
panel1.remove(bp_main);=20
bp_main =3D newWizardPanel;=20
panel1.add(bp_main, BorderLayout.CENTER);=20
this.pack();=20
}=20
=20
I am guessing that this makes the half job. All I have to do is to =
tell the window/panel1 to repaint and the correct object's will appear. =
Am I right?=20
Anyway, what can I do to make them visible?=20
The window is a dialog and I am using a JB Pro 1.0(snif!).=20
=20
--=20
Papadomichelakis John=20
"Unite for Java! - http://www.javalobby.org"=20
__________________________________________________=20
email : michelos@freemail.gr=20
TEL : 30 31 758 429, 30 31 709 796=20
__________________________________________________=20
=20
------=_NextPart_000_00CB_01BD1C64.68674E70
Content-Type: text/html;
charset="iso-8859-7"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>You may also want to look at using =
the=20
CardLayout for this. That is what it was designed =
for.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Carl</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
<DIV>John Papadomichelakis<MICHELOS@FREEMAIL.GR> wrote in message =
<<A=20
=
href=3D"mailto:34B53E4D.547F9595@freemail.gr">34B53E4D.547F9595@freemail.=
gr</A>>...</DIV>Hi=20
JBers.=20
<P>I want to implement a wizard interface. My first thought was to =
use one=20
window that will show, each time, the proper panel.=20
<P>So.. I create a BevelPanel for each step I want to show, however =
I find=20
difficult to display them.=20
<P>Currently, what I am doing is:=20
<P><TT> WizardPanel newWizardPanel;</TT>=20
<P><TT> newWizardPanel =3D =
bp_main.goPreviousPage();</TT>=20
<P><TT> if(newWizardPanel!=3Dnull){</TT>=20
<BR><TT> panel1.remove(bp_main);</TT>=20
<BR><TT> bp_main =3D =
newWizardPanel;</TT>=20
<BR><TT> panel1.add(bp_main,=20
BorderLayout.CENTER);</TT> <BR><TT> =20
this.pack();</TT> <BR><TT> }</TT> <BR> =20
<P>I am guessing that this makes the half job. All I have to do is =
to tell=20
the window/panel1 to repaint and the correct object's will appear. =
Am I=20
right?=20
<P>Anyway, what can I do to make them visible?=20
<P>The window is a dialog and I am using a JB Pro 1.0(snif!). =
<BR> =20
<P>--=20
<P>Papadomichelakis John <BR>"Unite for Java! - <A=20
href=3D"http://www.javalobby.org">http://www.javalobby.org</A>" =
<BR>__________________________________________________ <BR>email :=20
michelos@freemail.gr <BR>TEL : 30 31 758=20
429, 30 31 709 796=20
<BR>__________________________________________________ <BR> =20
</P></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_00CB_01BD1C64.68674E70--
Technical Details
Message-ID:
<693ngb$6ib12@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34B53E4D.547F9595@freemail.gr>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,9e90fabf2658a925,start X-Google-Attributes: gidf74b3,public From: "Carl Hewitt" <carl@oop.com> Subject: Re: Adding/Removing panels at runtime. Date: 1998/01/08 Message-ID: <693ngb$6ib12@forums.borland.com> X-Deja-AN: 314112423 References: <34B53E4D.547F9595@freemail.gr> Content-Type: multipart/alternative; boundary="----=_NextPart_000_00CB_01BD1C64.68674E70" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: None Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language