0

Dear friends.
Please give me the logic or code to display image based on number(in database) entered in the text box by the user.
thanks in advance
prabhu.

3
Contributors
3
Replies
4
Views
11 Years
Discussion Span
Last Post by freesoft_2000
0

JTextField imageField = new JTextField(4);
Image[] images = new Image[42]; //array of images

int index = Integer.parseInt(imageField.getText());

Image image = images(index);

0

please send me the code for implementing in JSP...
thanks in advance
prabhu.


JTextField imageField = new JTextField(4);
Image[] images = new Image[42]; //array of images

int index = Integer.parseInt(imageField.getText());

Image image = images(index);

0

Hi everyone,

please send me the code for implementing in JSP.

I don't mean to be bad, but the solution phaelax gave you can be implemented in most languages. His alogarithm is simple to use.

You can read up on arrays and this will most probably give you an idea of what he is doing but i doubt anyone will plonk down the answers for you

Richard west

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.