It's not a secret anymore!
The moose likes Swing / AWT / SWT and the fly likes mouseOver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "mouseOver" Watch "mouseOver" New topic
Author

mouseOver

Dalibor Toth
Ranch Hand

Joined: Jul 16, 2001
Posts: 38
Can I draw a rectangle and do mouseOver action over it?
Thank you!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17038
    
  26

Yes. The Java/AWT/Swing forum is probably a better place to get details on how to do it, though. They're more into graphics.


An IDE is no substitute for an Intelligent Developer.
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Dalibor,
This will probably get a better response and will better support forum readers in the AWT/Swing forum.
I am moving it there ...
Regards,
Manfred.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Here's how you'd do something like that...



-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Dalibor Toth
Ranch Hand

Joined: Jul 16, 2001
Posts: 38
I'm sorry Sir, I couldn't get your code working. I got the following error I couldn't debugg:
java.lang.ClassCastException: RectDrawer
at sun.applet.AppletPanel.createApplet(AppletPanel.java:579)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:515)
at sun.applet.AppletPanel.run(AppletPanel.java:293)
at java.lang.Thread.run(Thread.java:484)
Could you, please, take a look at it?
Thanks!
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Dalibor,
Nathan has not given you an Applet. Therefore you can't use AppletViewer to run it! He has given you an application ...
Just type the following on a DOS command line:
java RectDrawer
after you have compiled the application:
javac RectDraw.java
Regards,
Manfred.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mouseOver
 
jQuery in Action, 3rd edition