• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Displaying image in applet on click event

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I need your help in the following problem:
I have an applet in which i am displaying my images after selecting them from a dialog box. It is displaying all the images in the applet (i am also providing the code below).
Now i want to enhance its functionality.
I want that if i select 2 images from the dialog box it should display one of them and then if i click on the next button(which i created on the same frame) it should display the next image.
For this i am storing all my selected images in a buffered image and then retrieving one by one on clicking the next button.
But in my case the image is not changing. It is remaining as the first image.
The following is the code i have :


If anybody has any idea please help me.
Thanks in advance.
 
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at these two lines from the actionPerformed() method.
The variable image is also declared at the class level!
So where does the second statement below put its value? local or class


Also your variable names could be changed for easier reading/understanding.
EG use openBtn vs button or nextBtn vs button1
[ June 19, 2008: Message edited by: Norm Radder ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic