Create New Image Using 1.1
posted 23 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hello! Could anybody tell how I could create a new blank image and assign current dimensions using only Java 1.1 API? What I'm basically trying to do is:
BufferedImage img = new BufferedImage(width, height,....);
only with just an image, in that API 1.1 doesn't support BufferedImage.
BufferedImage img = new BufferedImage(width, height,....);
only with just an image, in that API 1.1 doesn't support BufferedImage.
Thanks.<br />-Nick
posted 23 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Look at Component.createImage(int width, int height).
The Component's peer must already have been created for this call to work, so don't use it in the classes constructor.
The Component's peer must already have been created for this call to work, so don't use it in the classes constructor.
David G. Risner<br />Software Engineer<br />California State University, Los Angeles
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
How to force components peer creation,
I am getting null on createImage
I have an applet which has an panel. Inside panel class within paint method i am trying to create an image(width, height) it returns null.
I put the same code inside addnotify method it doesnt work either,
This panel is constructor inside applet init method.
Please help
Farouk
I am getting null on createImage
I have an applet which has an panel. Inside panel class within paint method i am trying to create an image(width, height) it returns null.
I put the same code inside addnotify method it doesnt work either,
This panel is constructor inside applet init method.
Please help
Farouk
SCJP, SCWCD, SCBCD, SCEA 5
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Mohamed Farouk
Ranch Hand
Posts: 249
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi
Thanks for your code I appreciate. The problem I have is that I dont want the Image to appear in the applet but rather in a separate panel inside the applet.
So say if the size of the applet is 600 * 600 the panel inside should residein the center of the applet and contain the image. This is where I have problem as you have detailed I am able to create an image inside an applet without any panel in it.
The panel which will contain the image will be cleaned and corrected using mouse actions and i like the background color of the applet to be different from the panel.
Hope you understand my main issue is how to embed an image inside an panel which will reside inside a applet
Thanks appreciate your help
Thanks for your code I appreciate. The problem I have is that I dont want the Image to appear in the applet but rather in a separate panel inside the applet.
So say if the size of the applet is 600 * 600 the panel inside should residein the center of the applet and contain the image. This is where I have problem as you have detailed I am able to create an image inside an applet without any panel in it.
The panel which will contain the image will be cleaned and corrected using mouse actions and i like the background color of the applet to be different from the panel.
Hope you understand my main issue is how to embed an image inside an panel which will reside inside a applet
Thanks appreciate your help
SCJP, SCWCD, SCBCD, SCEA 5
Craig Wood
Ranch Hand
Posts: 1535
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Mohamed Farouk
Ranch Hand
Posts: 249
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi
Thanks for your code I appreciate. The problem I have is that I dont want the Image to appear in the applet but rather in a separate panel inside the applet.
So say if the size of the applet is 600 * 600 the panel inside should residein the center of the applet and contain the image. This is where I have problem as you have detailed I am able to create an image inside an applet without any panel in it.
The panel which will contain the image will be cleaned and corrected using mouse actions and i like the background color of the applet to be different from the panel.
Hope you understand my main issue is how to embed an image inside an panel which will reside inside a applet
Thanks appreciate your help
Thanks for your code I appreciate. The problem I have is that I dont want the Image to appear in the applet but rather in a separate panel inside the applet.
So say if the size of the applet is 600 * 600 the panel inside should residein the center of the applet and contain the image. This is where I have problem as you have detailed I am able to create an image inside an applet without any panel in it.
The panel which will contain the image will be cleaned and corrected using mouse actions and i like the background color of the applet to be different from the panel.
Hope you understand my main issue is how to embed an image inside an panel which will reside inside a applet
Thanks appreciate your help
SCJP, SCWCD, SCBCD, SCEA 5
Mohamed Farouk
Ranch Hand
Posts: 249
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi sorry when i run the code you sent me it does show only a pink box nothing else. Please can you check
Thanks
Farouk
Thanks
Farouk
SCJP, SCWCD, SCBCD, SCEA 5
posted 19 years ago
Ummm, does the InnerPanel class which is used to display the image not qualify as a Panel?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
The problem I have is that I dont want the Image to appear in the applet but rather in a separate panel inside the applet.
Ummm, does the InnerPanel class which is used to display the image not qualify as a Panel?
| Lookout! Runaway whale! Hide behind this tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |









