[641] in java-interest

home help back first fref pref prev next nref lref last post

novice DIBitmap question

daemon@ATHENA.MIT.EDU (jeff masek)
Mon Jul 10 17:52:47 1995

Date: Mon, 10 Jul 1995 09:37:14 -0400
To: java-interest@java.Eng.Sun.COM
From: masek@GEOLOGY.GEO.CORNELL.EDU (jeff masek)

This is a fairly simple problem, but I can't seem to get it to
work...Having created a valid DIBitmap object, how do I get it to display
on the screen?

Right now I've got the following (unsucessful code) in an update method:
        
                im = createImage(500,500);
                myDisplayItem = new ImageDisplayItem(im);
                myDisplayItem.setImage(myBitMap); 
                myDisplayItem.paint(im.win,0,0);

This code snippet seems to work fine when I substitute an image object for
myBitMap on the third line, but doesn't work when using the DIBitMap
object. Although it compiles and runs, it just sticks up a white rectangle
of size 500x500 on the screen.

What am I doing wrong?
                                                Thanks, 
                                                        Jeff Masek

-------------------------------------------------------------------------
Dr. Jeffrey G. Masek                            masek@geology.cornell.edu   
Dept. Geological Sciences
Cornell University
Ithaca, NY 14853
-------------------------------------------------------------------------
  
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post