🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

JDialog: NullPointer Exception in IE

#12343
From: LMarco
Date: Mon, 25 Jan 1999 00:00
51 lines
2287 bytes
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: <36AC414D.6D6BEF82@d-velop.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

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