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

    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
    New Zealand
    Rep Power


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