Article View: borland.public.jbuilder.java.swing
Article #12674Re: Weird dialog boxes Shock Horror!
From: Marco L�bbering
Date: Fri, 20 Nov 1998 00:00
Date: Fri, 20 Nov 1998 00:00
39 lines
1692 bytes
1692 bytes
Marco L�bbering wrote:
> Phillipus wrote:
>
> > Has anyone come across the mysterious case of dialog boxes /
> > JOptionPanes displaying the wrong title bars?
> >
> > I'm using JDK 1.1.6 & 1.1.7 with Swing 1.0.3.
> > ...
> > Basically it seems I get the title message of the previous (or first)
> > JOptionPane each time.
> >
> > Weirdness!!!
> >
> > Phillipus
>
> I had the same problem with JoptionPane. A short workaround is to call
> dispose() after the Dialog was shown:
>
> myDialog.show();
> myDialog.dispose();
>
> I hope this will help you ...
> LMarco
Here the code I used to show OptionPanes: JOptionPane ErrorDialog = new
JOptionPane(){
public int getMaxCharactersPerLineCount() {return 80;}
};
ErrorDialog.setMessageType(JOptionPane.WARNING_MESSAGE);
ErrorDialog.setMessage("Hello");
JDialog dialog = ErrorDialog.createDialog(D3WWWClient.container1,
"Title" );
dialog.setSize(dialog.getSize().width+5,dialog.getSize().height+5);
//Get Rid of Sizebug in Hotjava
dialog.show();
dialog.dispose(); // behebt die meisten JOptionPane-Bugs
Technical Details
Message-ID:
<3655418E.CF48E8BC@gmx.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3653F524.B9A891EC@bangor.ac.uk> <365540C8.46AABAAE@gmx.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 111d45,750460920fab1817 X-Google-Attributes: gid111d45,public From: "Marco L�bbering" <LMarco@gmx.net> Subject: Re: Weird dialog boxes Shock Horror! Date: 1998/11/20 Message-ID: <3655418E.CF48E8BC@gmx.net> X-Deja-AN: 413827252 Content-Transfer-Encoding: 8bit References: <3653F524.B9A891EC@bangor.ac.uk> <365540C8.46AABAAE@gmx.net> Content-Type: text/plain; charset=iso-8859-1 Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing