473,386 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

calling addMouseListener in jscript throws ClassCastException

Hi,

We have an applet that implements the MouseListener interface but when
trying to add the applet to the glasspane of another applet a
classcastexception is thrown.

This all seemed to work fine when using JDK1.3.1_08 but since using
JDK1.4.2 it does not work.

The class implementing the mouse listener interface is defined using:

public class MapListener extends JApplet implements MouseListener,
MouseMotionListener

and created within the HTML page using:

<applet width="600" height="0" code="MapListener.class"
name="MapListener" MAYSCRIPT="true"> </applet>

The MapListener object is referenced in jscript using:

var applet = parent.mapFrame.document.MapListener;

and is added to the glass pane of an applet named IMSMap using:

parent.mapFrame.IMSMap.getGlassPane().addMouseList ener(applet);

This line however throws a jscript exception with message
'java.lang.ClassCastException: javax.swing.JPanel' and with name
'RangeError'

We are using IE6.0.2800

Any light anybody could shed on this would be very greatfully
received.

Thanks,

Jon-Paul.
Jul 17 '05 #1
3 2411
Jon-Paul Dobson wrote:

This shouldn't be on c.l.javascript.
Java != Javascript
Jul 17 '05 #2
Jim Higson wrote:
Jon-Paul Dobson wrote:

This shouldn't be on c.l.javascript.
Java != Javascript


Never heard of Java cooperating with JavaScript?

Read the article carefully before you respond.

Edwin Martin
--
http://www.bitstorm.org/
Jul 17 '05 #3
ashwin
1
I am facing the same problem. If any one has a solution/workaround, please do let me know.
I'm using JDK 1.5
Thanks
Ashwin
Feb 14 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Casper B | last post by:
Since I am only able to pass simple beans around using my Web Service framework, I wonder how to incorporate business logic around these beans. My idea was to let my Beans be the base class and...
1
by: Chris | last post by:
I use websphere connection pooling and had a failure attempting a CLOB.createTemporary. tempClob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION); Here's an excerpt of the exception...
1
by: Johannes Lebek | last post by:
Hi there, I made some changes to my XSL stylesheet and now Xalan 2.5.1 is facing ClassCastExceptions. I'm pretty sure, that the changes I made should work (they are quite complicated -- I'd like...
1
by: Venkat | last post by:
Hi All, I am not able to access a dll function from a remote script using ActiveXobject when an output parameter is used, but i could able to access the same when no output parameter is used....
2
by: Jon-Paul Dobson | last post by:
Hi, We have an applet that implements the MouseListener interface but when trying to add the applet to the glasspane of another applet a classcastexception is thrown. This all seemed to work...
5
by: benc | last post by:
Hi Can some good soul help on this. I need to call jscript functions from C#. I have hosted a web control and displayed an html page successfully, but just can't find a way to call jscript...
0
by: ttomic | last post by:
I have asp.net application written in jscript. On POST request, during Page_Load, I receive string which I evaluate using jscript eval method. String looks like: my_fun("arg") where my_fun is...
7
by: David Schwartz | last post by:
Does anyone know how I can call a function in a VB.NET DLL from Java script code? Thanks.
1
by: kanthi84 | last post by:
hi, while i was trying to insert value into a blob column, i got an exception saying java.lang.ClassCastException: com.evermind.sql.OrclResultSet
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.