• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

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.
 
You save more money with a clothesline than dozens of light bulb purchases. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic