-
path and filename structures
Hi there:
I'm trying to understand how to designate the path to a particular
file when making use of the ImageIcon(String filename) class. In the
help files it explains that the filename arguement should be something
like: "images/explode.gif"
My directory stucture is like this:
network
|__ jbsc
|__images
My class files are in jbsc. I place a copy of explode.gif in all three
directories.
Then I tried ImageIcon("images/explode.gif"). I expected it to find the
file in the images directory but it didn't. So I tried just
ImageIcon("explode.gif") thinking it will at least find the file in jbsc
(the same directory as the class files). Nope, it didn't. So I tried
ImageIcon("network/explode.gif"). This time it found it!
The thing is, I want it to load from the images directory. So how do I
tell it that?
Alan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks