Results 1 to 2 of 2
  1. #1
    imorio is offline Senior Member
    Join Date
    Aug 2010
    Posts
    127
    Rep Power
    0

    Default adding drawing images on a "Graphics instance"

    I'm making a program and I want to display pictures (not graphics drawn on the spot using fillOval, fillRect etc,). Can anyone help me with this?
    the problems are these:

    1. loading an image from a file (probably a .jpg file, but the extension doesn't matter to me).

    2. drawing an image from a file to a screen. This shouldn't be hard, but is it also possible to draw the image rotated x degrees. So for example drawing the image rotated 73 degrees clock-wise.

    3. turning the code and the picture's into one program. Is there a way to make one .jar file with both the image and the code in it?

    I don't need direct answers, links to specific API's and tutorials are enough.

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,585
    Rep Power
    12

    Default

    Have a look at The Java Tutorial.

    2D Graphics covers loading and rendering (with transforms). Packaging Programs in Jar Files deals with how classes and other resources can be placed in a single jar archive for deployment.

Similar Threads

  1. Replies: 1
    Last Post: 01-21-2010, 10:20 AM
  2. Adding "Choose File" button to applet
    By mju4t in forum Java Applets
    Replies: 1
    Last Post: 09-17-2009, 09:11 AM
  3. "endless" eventLoop when creating new Instance
    By javacafe in forum Eclipse
    Replies: 0
    Last Post: 08-10-2009, 07:37 PM
  4. Replies: 2
    Last Post: 01-24-2009, 07:56 PM
  5. Replies: 1
    Last Post: 10-20-2008, 08:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •