Hi,
In an introductory book on
Java, a simple method for doing Java 2D graphics is described in these steps:
1. Extend JPanel
2. override void paintComponent(Graphics g)
3. cast (Graphics g) to (Graphics2D)
4. use the J2D API from here.
Is this the only way, or was this just a simple introduction? The reason I ask is that there are some faults with it. The two main problems I have are:
1. The drawing flickers every time i move the JFrame containing it.
2. It won't seem to compile with gij under linux! i get the error
java.lang.ClassCastException: gnu.java.awt.peer.gtk.GdkGraphics cannot be cast to java.awt.Graphics2D
Chris