Article View: borland.public.jbuilder.java.language
Article #19252Re: On Dialogs
From: Rich Wilkman
Date: Thu, 19 Feb 1998 00:00
Date: Thu, 19 Feb 1998 00:00
69 lines
2576 bytes
2576 bytes
Conrad:
I agree it's misleading in the use of the term parent, though that
fits the activities and concepts when using the designer. It would be
more accurate to say that a Dialog requires a Frame object to be
constructed and that the requirement of an argument in the constructor
is what makes a Dialog not a bean.
I'll but in a sugg for clarification.
-Rich
Conrad Hoesle-Kienzlen wrote:
>
> JBuilder online (and printed) documentation is wrong on Dialogs. It
> states that a Dialog must be constructed with a parent frame (and
> therefore cannot be made into a bean). This is not necessary. One can
> create a new dialog with:
> Dialog myDialog = new Dialog(new Frame());
> and one can create a bean with:
>
> public class DialogBean extends Dialog {
> Panel messagePanel = new Panel();
> static Frame frm = new Frame(); // <------- this is the
> trick!!!!!!!!!
> BorderLayout borderLayout1 = new BorderLayout();
> .........
>
> // the main constructor
> private DialogBean(Frame frame, String title, boolean modal) {
> super(frm, title, modal);
> try {
> jbInit();
> }
> catch (Exception e) { e.printStackTrace(); }
> add(messagePanel, "Center");
> }
>
> // parameterless constructor for the bean
> public DialogBean() {
> this(frm, "", true);
> }
>
> public void jbInit() throws Exception {
> this.addWindowListener(new DialogBean_this_windowAdapter(this));
> messagePanel.setLayout(borderLayout1);
> .......
> }
>
> ........
>
> Hope, this helps somebody,
> Conrad
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rich Wilkman
Senior Quality Assurance Engineer
Borland JBuilder Team
If you see something that looks like an opinion up there,
it's mine and mine alone.
Mail sent to me from the newsgroups won't bounce but will
be ignored. If I have time, I'll respond, but you have
a better chance if you confine your posts to the newsgroups
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<34ECC149.D7A907AA@corp.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34ECB0F1.75915074@csi.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,597eca2139f62518 X-Google-Attributes: gidf74b3,public From: Rich Wilkman <rwilkman@corp.borland.com> Subject: Re: On Dialogs Date: 1998/02/19 Message-ID: <34ECC149.D7A907AA@corp.borland.com> X-Deja-AN: 326754011 Content-Transfer-Encoding: 7bit References: <34ECB0F1.75915074@csi.com> Content-Type: text/plain; charset=us-ascii Organization: None Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language