Results 1 to 3 of 3
- 05-14-2012, 05:07 AM #1
Senior Member
- Join Date
- Apr 2012
- Posts
- 115
- Rep Power
- 0
How do I make images available for my GUI?
I was going through some image tutorials with thenewboston and he said I need to put the images in the same directory as my .java files
I guess so I can use getClass().getResource();
however after I did this they dont show up at all in the package explorer of eclipse. they are in png format as suggested, apparently he had trouble with other formats
not only can eclipse not see them but the code that reference them also wont work
troubleshooting, are there any eclipse menus or things that I can do to import them for my environment?
- 05-14-2012, 05:47 AM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,605
- Rep Power
- 5
Re: How do I make images available for my GUI?
Move to Eclipse
I would be cautious of a tutorial that only works for png, and not other formats that are standard image formats readily read by ImageIO of comparable java tools (jpeg, gif)they are in png format as suggested, apparently he had trouble with other formats
Define 'wont work' (and please use proper grammar and capitalization - you are talking to programmers who write code all day long that requires exact syntax)..did you import the image into your project/package?not only can eclipse not see them but the code that reference them also wont work
- 05-14-2012, 06:10 AM #3
Re: How do I make images available for my GUI?
Why do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
How do I make a JPanel (which holds images) scrollable?
By Ami in forum AWT / SwingReplies: 1Last Post: 03-03-2012, 09:35 PM -
can i make a program to make keyboard and mouse idle or not responding for 10 second
By 3ammary in forum Advanced JavaReplies: 4Last Post: 07-23-2011, 08:08 PM -
how to mark on 2 images at a time,both images are on different JPanel
By smitharavi in forum AWT / SwingReplies: 0Last Post: 12-16-2010, 05:14 PM -
how to scroll 2 images at a time(synchronisation),both images are on different panels
By smitharavi in forum AWT / SwingReplies: 4Last Post: 12-16-2010, 04:32 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks