Solved

bring graphics file into project

Posted on 1998-08-01
6
160 Views
Last Modified: 2013-11-19
i am using symantec visual cafe
i want to bring a graphics file (bmp, jpg, etc.) into the project (much like one would add a resource to Visual C++)

how is this done?
0
Comment
Question by:jdaues
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 2

Expert Comment

by:aziz061097
ID: 1230374
In the paint method of the Applet write the following code. where MyImage.jpg exists in the same directory where the applet is launched. You can even specify a path if the image file exists in other directory by getImage("\\Mydirectory\\MyImage.jpg");

Image img = getToolkit().getImage("MyImage.jpg");
g.drawImage(img, 0, 0, 615, 430, this);

0
 

Author Comment

by:jdaues
ID: 1230375
ummm...i guess i wasn't clear enough in my question.. your code is good, and in fact looks a lot like what i have already written.  what i wanted was a way to include the graphics file in my project, as opposed to the file being a separate piece.


0
 
LVL 3

Accepted Solution

by:
sailwind earned 50 total points
ID: 1230376
For me, I use the insert to add the image files to my project.
In Cafe, go to:
Insert -> files into project
choose files of type "net files", then select all the files you want
to include in your project and click on add.

- Tony

0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:jdaues
ID: 1230377
that's closer...i want to be able to refer to the bitmap within my project as a resource,
not a file.  is that possible?
0
 
LVL 3

Expert Comment

by:sailwind
ID: 1230378

First of all, can you clarify what's the difference between using the bitmap
as a resource and a file? Do you mean you want to access the bitmap when
you compile but not when you generate the final archive? What would the
advantage be to referring the bitmap as a resource as opposed to a file?
I looked around in the help file but didn't see any specifications for adding a
resource, only individual files.

0
 

Author Comment

by:jdaues
ID: 1230379
>can you clarify what's the difference between using the bitmap as a resource and a file
its something i am accustomed to doing in Visual C++, but apparently not possible in Visual Cafe.  its just a convenience of having the graphic in the project, as opposed to externally.

>I looked around in the help file but didn't see any specifications for adding a
>resource, only individual files.
i didn't either, but i just started using Visual Cafe last weekend, so i thought i would ask

0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Learn how to use the remote presentation tool in Prezi to allow you to harness the power of this cloud based presentation platform. You can show your presentation with a remote audience using this free tool.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question