Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25

Thread: Image troubles

  1. #21
    Theodoreb is offline Member
    Join Date
    Jul 2009
    Posts
    15
    Rep Power
    0

    Default

    So by directory do you mean create a folder containing the needed images inside the same folder as the java classes?
    And how do you JAR an applet?

  2. #22
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by Theodoreb View Post
    So by directory do you mean create a folder containing the needed images inside the same folder as the java classes?
    Yep. Give it a try.
    And how do you JAR an applet?
    1) read the Sun tutorial on doing this.
    2) If you use an IDE such as NetBeans or Eclipse, this is one place where they shine.

  3. #23
    Theodoreb is offline Member
    Join Date
    Jul 2009
    Posts
    15
    Rep Power
    0

    Default

    Ok, I am using JCreator. When you first create an applet, you have two folders: classes and src. In the classes folder there is the HTML file, and in the src folder there is all the code. Where do I place the "Images" folder? I tried putting it in the classes folder and the src folder, both producing yet another blank applet. :(

  4. #24
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    I don't use JCreator, so I don't know how you make changes with it per se. But after you made the changes above, did you also change your source code to look for an image file in the Images folder? Also, have you gone through the Sun applet tutorial on this, on showing images and how to get image data?

  5. #25
    Theodoreb is offline Member
    Join Date
    Jul 2009
    Posts
    15
    Rep Power
    0

    Default

    Quote Originally Posted by Fubarable View Post
    I don't use JCreator, so I don't know how you make changes with it per se. But after you made the changes above, did you also change your source code to look for an image file in the Images folder? Also, have you gone through the Sun applet tutorial on this, on showing images and how to get image data?
    I've been through almost every tutorial on the web and every single time I get the same results. I've tried putting the image in an image folder every where, I even used eclipse and placing the image in my newly created "resources" folder inside src didn't work. The applet just appears blank the entire time. I'm really, really stumped... How would I change the source code to do as you stated in #24?

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 3
    Last Post: 01-29-2010, 07:53 AM
  2. Gif decoding/LZW troubles
    By hellochar in forum Advanced Java
    Replies: 2
    Last Post: 07-15-2009, 12:26 AM
  3. subclass troubles
    By xf021209 in forum New To Java
    Replies: 12
    Last Post: 04-21-2009, 12:46 AM
  4. [SOLVED] Array troubles, yes I searched...
    By Reiyn in forum New To Java
    Replies: 11
    Last Post: 04-17-2009, 12:28 AM
  5. StreamCorruptedException and Casting troubles
    By Wassa in forum Networking
    Replies: 2
    Last Post: 02-18-2009, 04:07 PM

Tags for this Thread

Posting Permissions

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