-
problem with drawString
i am creating a java application in eclipse. the java framework i'm using is 1.4.2 and the version of eclipse is 3.1.2.
the issue i'm having is with drawString. when i attempt to call drawString on a Graphics or Graphics2D object i get the error...
-------------------------------------------------
*** glibc detected *** free(): invalid pointer: 0x08089250 ***
-------------------------------------------------
here is a sample bit of code that produces the error:
-------------------------------------------------
BufferedImage img = new BufferedImage( 100, 100, BufferedImage.TYPE_INT_RGB );
Graphics g = img.getGraphics();
g.drawString( "test", 0, 0 );
-------------------------------------------------
i, however, do not get any error when i call drawString on the Graphics object in the overriden "paint" method of a JFrame object. for example, the following code works fine:
-------------------------------------------------
public void paint( Graphics g )
{
g.drawString( "test", 20, 40 );
}
-------------------------------------------------
if someone could please help me out, i'd greatly appreciate it! i'm new to java and this problem has kept me stumped for many hours.
thanks,
mike
-
This doesn't seem like a Java problem, but rather a problem with the JVM. What version of the JVM are you using?
~evlich
-
thanks!
i switched to a different version of the jvm and it works!
thank you so much!
mike
Similar Threads
-
By Irina in forum ASP.NET
Replies: 0
Last Post: 11-29-2002, 10:47 PM
-
Replies: 0
Last Post: 12-13-2001, 12:06 PM
-
By Roseta in forum VB Classic
Replies: 0
Last Post: 11-14-2001, 03:24 AM
-
By Ayman in forum VB Classic
Replies: 0
Last Post: 04-03-2000, 01:08 AM
-
By Jason Bock in forum VB Classic
Replies: 0
Last Post: 03-21-2000, 06:48 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks