Hi, guys! I've just started working with Java 2D. I've written test code:
BufferedImage img = null; img = ImageIO.read(new File("strawberry.bmp")); int w = img.getWidth(); int h = img.getHeight(); int rectx = w/4; int recty = h/4; // Draws the ellipse into the buffered image. img.setColor(new Color(1.0f, 0.0f, 0.0f, 1.0f)); img.fill(new Ellipse2D.Double(rectx+rectx/2,recty+recty/2,150,100)); And in the last two line compiler finds errors: C:\Java code\TestImage\src\testimage\Main.java:62: cannot find symbol symbol : method setColor(java.awt.Color) location: class java.awt.image.BufferedImage img.setColor(new Color(1.0f, 0.0f, 0.0f, 1.0f)); C:\Java code\TestImage\src\testimage\Main.java:64: cannot find symbol symbol : method fill(java.awt.geom.Ellipse2D.Double) location: class java.awt.image.BufferedImage img.fill(new Ellipse2D.Double(rectx+rectx/2,recty+recty/2,150,100)); 2 errors How to fix this? I would think that I should to install something, but as far as I know AWT library already installed with JDK together... Can anybody help, please? And the second question: how to share one Java class between different projects? [Message sent by forum member 'seagal' (seagal)] http://forums.java.net/jive/thread.jspa?messageID=318351 =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".