• 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 images

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I need to load images into a Frame. Also, I must have to move them, change their size and, if it's possible, to rotate them. It's not an applet. May somebodye to help me? thks a lot
 
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
You'll need to look into Java2D... it supports all these operations... I would put each image onto a separate JPanel or JLabel to control it. I'll work on a simple code example... could you give a little more background in what you are trying to do?

-Nate
 
Gustave Gustave
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nathan,
You can mind my application like a photo album. First, I insert blank pages and then I'm add images into the page. Really, this application must have support the insertion of images, texts, and video, but the last one is not very important for now. One more question: How can I to get the position of the pics inserted? Thansk again
 
Nathan Pruett
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
Sounds like you still need to look into Java2D... along with JMF ( the Java Media Framework... a must if you are going to work with video... ) and JAI ( the Java Advanced Imaging API ). I would use a JPanel with a null layout for the "page", since the user is going to be laying out the components on the page, you are going to need for location and bounds to be explicitly set. I would make the photos ImageIcons on JLabels, and do text on JTextAreas ( or JEditorPanes, depending on what you need... ). I haven't worked that much with video, but it also has some sort of component to put it on the page. All components have the methods getLocation() to get the Point of the upper left corner, getSize() to get the current Dimension size, and getBounds() which returns a combination of these as a Rectangle, so you can get infomation about where an object is and how large it is.

-Nate
 
Hey cool! They got a blimp! But I have a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic