This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCJ compiles fine, but I get cast exception


Ciamak Abkai wrote:

> I try to run prefuse applying gcj.   There is a problem with the
> following cast :
> 
>    Graphics2D g2D = (Graphics2D)g;

> 
> Exception during event dispatch:
> Exception in thread "prefuse_ActivityManager"
> java.lang.ClassCastException: gnu.java.awt.peer.gtk.GdkGraphics cannot
> be cast to java.awt.Graphics2D at
> prefuse.Display.paintComponent(Display.java:795)
> 
> 
> 
> Do you have an idea how to solve the Problem ?

GdkGraphics doesn't extend Graphics2D.  Do you have any reason to
believe that it should?  It extends Graphics.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]