Hi, I am quite a competent c++ console programmer but I need to do some work with loading images and clicking on the images. I want to load a screen full of images, click on an image and be able to retrieve the code, index or some value which uniquely identifies the image which I clicked on. Is java the right tool? i need some direction to get started. Sample code would be a good jumpstart. i am prepared to read an experiment
well you can implement it in any language you wish. implementing in Consol C is a bit lenghty, since first you have to make function to load images bla bla.
I'd prefer to go for any High level language of your choice (C#, VC, VB, Java etc)
The logic behind this work is quite simple. you can either use a database or simple file (XML preferable). There will eb unique name for each image say "image1", "image2" ... if i talk XML then you'll have some tags like that
<image>
<name="image1">
<value>
"any value you wish to have for that image to be loaded in your program"
</value>
</name>
<name="image2">
<value>
"any value you wish to have for that image to be loaded in your program"
</value>
</name>
</image>
Now on image click you read the xml, match the TAG and read it's value. The same thing can be done using Simple File. Just make a structure like
class ImageDate{
String name="image1";
String value="data";
} and write this data into file, you can then read those files and match the name to get value.
You can implement in Database as well. For this you have to do Database connectivity.
There can be a table
name: varchar(50) PK
value: varchar(50) NOT NULL
on selecting the image you can use the following query to search from the Db
select * from image where name = [apend it from the program]