• 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

Image Processing Help

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

I've designed an Applet using VAJ and am having difficulty with image processing. I'm primarily relying on beans to do most of the work, and was hoping to avoid the low level code associated with painting images.
I have a number of components already in my applet. I would like to add a series of images (gif files) that are stored within an image array in my bean. I've been using g.drawimage, but I have to generate my own code for the coordinates and it does not address the problem of what happens to the images when the window is resized. Does anyone know of any beans or combination of beans that will do the work for me? Can anyone suggest an approach? Thanks.
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Betty,
I don't know of any component that will alter graphics that you have drawn. You are responsible for all the math (location, width, height, etc) to correctly redraw your images.
You might try using JLabel with the image sent to the constructor. The JLabel will be resized by the layout but I don't think that the image itself will be resized.
Good Luck,
Manfred.
 
Betty Reynolds
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Manfred, but I found a way. It has to do with using the ImageGlyph constructor, but that's part of IBM's VAJ functionality, so not particularly useful information unless you're using this package. My approach still needs some refinement, but it's a good start. I probably spent as much time dinking around with the wiring as I would if I had coded and debugged it myself.
reply
    Bookmark Topic Watch Topic
  • New Topic