• 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

JTextPane -captured image refreshing problem

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,
In my application it is necessary to capture the
screen and save it as jpeg and display the same in a JTextPane using <img> tag.
I have made use of com.sun.image.codec.jpeg to save the image and it works fine.
After starting the application the
first picture is displayed well but the other pictures though get saved is not displayed in the JTextPane.Only the previous picture remains.
I have made use of new Instance of TextPane each time.All the captured images are saved in the same name say "images/screenshot.jpg" one at a time.
Please tell me what would be the problem.
Expecting your reply
Thanks and Best Regards,
AnushaJv
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch!
The first thing I'd try would be to give a unique name to each saved image and see if that works. If it does, I'd hiss and spit a little bit; otherwise, I'd hiss and spit a little bit.
 
Anusha Jeyappa
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the immediate response.
My requirement is to have a same name for all dynamically generated images.
Is there any option for refreshing!
Anusha Jv
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This post tells you what you need to do.

-Nate
 
Anusha Jeyappa
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The image that is captured is not set directly in any component instead I am using HTML tag <img src...>
This image is shown along with text in the JTextPane.
The text set in the JTextPane changes corectly but the image (same name) doesn't.
 
reply
    Bookmark Topic Watch Topic
  • New Topic