[JAVA2D] Problems with BufferedImage.createGraphics

2004-06-21 Thread Sven Mielordt
Dear fellows,

I have a strange Problem with creation of Graphics2D for an BufferedImage. Code 
fragment:

BufferedImage bufferedImage1;
Graphics2D g2d;
int width = 1000; // absolute pixels
int height = 800; // absolute pixels

// Create a buffered image in which to draw
bufferedImage1 = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
// Create a graphics contents on the buffered image
g2d = bufferedImage1.createGraphics();


When using JBuilder 8 Personal Edition with JDK 1.4.1-b21 under Windows98, all works 
fine and further use of graphics commands and final call of 
ImageIO.write(bufferedImage1, png, new File(fileName4pic)) behave as expected.

When using the same JBuilder 8 Personal Edition with the same JDK 1.4.1-b21 under 
Windows2000, the following surprising error message is displayed:

java.lang.NoClassDefFoundError
at sun.java2d.Disposer.addRecord(Disposer.java:68)
at sun.awt.image.BufImgSurfaceData.initRaster(Native Method)
at sun.awt.image.BufImgSurfaceData.createDataIC(BufImgSurfaceData.java:226)
at sun.awt.image.BufImgSurfaceData.createData(BufImgSurfaceData.java:69)
at 
sun.java2d.SunGraphicsEnvironment.createGraphics(SunGraphicsEnvironment.java:266)
at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1043)
at markov8.TestBufferedImage.main(TestBufferedImage.java:27)
Exception in thread main

When using the JBuilder 9 Personal Edition with the same JDK 1.4.1_02-b06 under Red 
Hat Linux 9, the following surprising error message is displayed:


Exception in thread main java.lang.NoClassDefFoundError
at sun.java2d.Disposer.addRecord(Disposer.java:68)
at sun.awt.image.BufImgSurfaceData.initRaster(Native Method)
at sun.awt.image.BufImgSurfaceData.createDataIC(BufImgSurfaceData.java:238)
at sun.awt.image.BufImgSurfaceData.createData(BufImgSurfaceData.java:73)
at 
sun.java2d.SunGraphicsEnvironment.createGraphics(SunGraphicsEnvironment.java:266)
at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1043)
at markov8.TestBufferedImage.main(TestBufferedImage.java:27)

What the hell is going on here


Aufnehmen, abschicken, nah sein - So einfach ist
WEB.DE Video-Mail: http://freemail.web.de/?mc=021200

===
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.


[JAVA2D] disappearing borders

2004-06-21 Thread Braun-Friedman, David








I have a small problem that seems to be related to
the version of jdk being used. I have an image manipulation application
which contains two canvases for viewing images. At program startup both
canvases are assigned and given etched borders. My program has a function
that allows a user to annotate an image by drawing crosses on its graphical
context. When using the jdk1.4, the first time an annotation is painted
through a mouseclick, the borders disappear for good. This problem does
not occur with jdk1.3. If anyone can help me to figure why this is
happening or how to resolve the problem so everything works with the latest
jdk, it would be much appreciated. Thanks. 





*

David Braun-Friedman

Programadorde
Telecomunicaciones

Departamento de Electrónica y
Comunicaciones

Email (CEIT): [EMAIL PROTECTED]

Email (Fuera): [EMAIL PROTECTED]

Tlfno: 943 212 800
Extensión: 289

Móvil: 628527739



Centro de Estudios e Investigaciones Técnicas C.E.I.T.

Paseo Manuel de
Lardizabal, 15
20018 San Sebastian




*








===
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".
===
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".image001.jpg

Re: [JAVA2D] Problems with BufferedImage.createGraphics

2004-06-21 Thread Dmitri Trembovetski
  Hi Sven,

  do you see these problems when the application is run standalone
  (outside of JBuilder)?

  It looks like JBuilder does some mangling of the bootclasspath when
  it starts the app from IDE.

  Thank you,
Dmitri

On Mon, Jun 21, 2004 at 03:59:35PM +0200, Sven Mielordt wrote:
  Dear fellows,
 
  I have a strange Problem with creation of Graphics2D for an BufferedImage. Code 
  fragment:
 
  BufferedImage bufferedImage1;
  Graphics2D g2d;
  int width = 1000; // absolute pixels
  int height = 800; // absolute pixels
 
  // Create a buffered image in which to draw
  bufferedImage1 = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
  // Create a graphics contents on the buffered image
  g2d = bufferedImage1.createGraphics();
 
 
  When using JBuilder 8 Personal Edition with JDK 1.4.1-b21 under Windows98, all 
  works fine and further use of graphics commands and final call of 
  ImageIO.write(bufferedImage1, png, new File(fileName4pic)) behave as expected.
 
  When using the same JBuilder 8 Personal Edition with the same JDK 1.4.1-b21 under 
  Windows2000, the following surprising error message is displayed:
 
  java.lang.NoClassDefFoundError
  at sun.java2d.Disposer.addRecord(Disposer.java:68)
  at sun.awt.image.BufImgSurfaceData.initRaster(Native Method)
  at sun.awt.image.BufImgSurfaceData.createDataIC(BufImgSurfaceData.java:226)
  at sun.awt.image.BufImgSurfaceData.createData(BufImgSurfaceData.java:69)
  at 
  sun.java2d.SunGraphicsEnvironment.createGraphics(SunGraphicsEnvironment.java:266)
  at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1043)
  at markov8.TestBufferedImage.main(TestBufferedImage.java:27)
  Exception in thread main
 
  When using the JBuilder 9 Personal Edition with the same JDK 1.4.1_02-b06 under Red 
  Hat Linux 9, the following surprising error message is displayed:
 
 
  Exception in thread main java.lang.NoClassDefFoundError
  at sun.java2d.Disposer.addRecord(Disposer.java:68)
  at sun.awt.image.BufImgSurfaceData.initRaster(Native Method)
  at sun.awt.image.BufImgSurfaceData.createDataIC(BufImgSurfaceData.java:238)
  at sun.awt.image.BufImgSurfaceData.createData(BufImgSurfaceData.java:73)
  at 
  sun.java2d.SunGraphicsEnvironment.createGraphics(SunGraphicsEnvironment.java:266)
  at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1043)
  at markov8.TestBufferedImage.main(TestBufferedImage.java:27)
 
  What the hell is going on here
 
  
  Aufnehmen, abschicken, nah sein - So einfach ist
  WEB.DE Video-Mail: http://freemail.web.de/?mc=021200
 
  ===
  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.

===
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.