🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #12300

Re: JDialog: NullPointer Exception in IE

#12300
From: LMarco
Date: Fri, 29 Jan 1999 00:00
59 lines
2583 bytes
Hi,
I tested my applet with IE 5.0beta and in this version everything works
fine.
So it seems to be a Microsoft bug in IE 4.01!
by
LMarco

LMarco wrote:

> Dear All,
> I have posted this question a few weeks ago, but nobody could help me
> with this problem. Everytime when a user closes a JDialog in my applet
> the following exception occures in IE:
>
> Exception occurred during event dispatching:
> java.lang.NullPointerException
>  at java/awt/LightweightDispatcher.retargetMouseEvent
>  at java/awt/LightweightDispatcher.processMouseEvent
>  at java/awt/LightweightDispatcher.dispatchEvent
>  at java/awt/Container.dispatchEventImpl
>  at java/awt/Component.dispatchEvent
>  at java/awt/EventDispatchThread.run
>
> I use the following code to build and show the JDialog:
>
>   public boolean ShowYesNoDialog()  {
>     JOptionPane AskDialog = new JOptionPane(){
>       public int getMaxCharactersPerLineCount() {return 80;}
>     };
>     String[] options ={"YES","NO"};
>     AskDialog.setMessageType(JOptionPane.QUESTION_MESSAGE);
>     AskDialog.setOptionType(JOptionPane.YES_NO_OPTION);
>     AskDialog.setMessage("Do you really want to search without any
> predefined values ?");
>     AskDialog.setOptions(options);
>
>     JDialog dialog = AskDialog.createDialog(D3WWWClient.container1,
> "Hello");
>     dialog.setSize(dialog.getSize().width+5,dialog.getSize().height+5);
> // solve Sizebug in Hotjava
>     dialog.setModal(true);
>     dialog.show();
>     Object selectedValue = AskDialog.getValue();
>     dialog.dispose();
>
>     D3WWWClient.AL.paintAll(D3WWWClient.container1.getGraphics());
> //solve repaint problems in browser
>
>     if (selectedValue.equals("YES")
>       return true;
>     else
>       return false;
>   }
>
> The above code works fine in Netscape 4.05 -> 4.5 but not in IE 4 with
> SP1 !!!
> I hope somebody could help me this time with this problem.
> Thank you very much ...
> LMarco [  from germany ... sorry for my english  ;o)  ]
Technical Details
Message-ID: <36B1967F.ED270E32@d-velop.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36AC414D.6D6BEF82@d-velop.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,39685df880d462d6
X-Google-Attributes: gid111d45,public
From: LMarco <Marco.Luebbering@d-velop.de>
Subject: Re: JDialog: NullPointer Exception in IE
Date: 1999/01/29
Message-ID: <36B1967F.ED270E32@d-velop.de>
X-Deja-AN: 438305586
Content-Transfer-Encoding: 7bit
References: <36AC414D.6D6BEF82@d-velop.de>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing