Re: Anyone here use JCreater
See the answer posted on the other forum where you posted this question.
Re: Anyone here use JCreater
Re: Anyone here use JCreater
Now this path works fine but its the absolute path, and I can't really use this.
Code :
ImageIcon icon= new ImageIcon("C:\\Documents and Settings\\Compaq_Owner\\My Documents\\JCreator LE\\MyProjects\\project_name\\src\\resources\\picture"+ i +".gif");
Where as what I need is to know what the relative path is and how to direct to it
Re: Anyone here use JCreater
Solved and for anyone with the same problem
here's the solution that I have come up with for JCreater
Firstly put the image files into the classes's folder (not src folder!")
then replace this line
ImageIcon icon= new ImageIcon("src/picture"+ i +".gif");
With this line
ImageIcon icon= new ImageIcon(getClass().getResource("picture"+ i +".gif"));
Re: Anyone here use JCreater
Please don't crosspost, or if you must, please provide links between your posts so we all know whether a question has been answered. Recommended reading: http://www.javaprogrammingforums.com...s-posting.html
Re: Anyone here use JCreater
Quote:
Originally Posted by
KevinWorkman
I didn't cross post on this forum, if I post on a different forum it's because I'm looking for the best solution, A different forum could have 100,000 members that would never see a post here.
I presume it's noting the rules that you can't be members of 2 different programming forums.
Re: Anyone here use JCreater
Quote:
Originally Posted by
JoeBrown
I didn't cross post on this forum, if I post on a different forum it's because I'm looking for the best solution, A different forum could have 100,000 members that would never see a post here.
That's exactly the point. You could ask a question in 10 different places, and receive an answer in one of those places within 5 minutes. So why should everyone from the other 9 places waste time answering the question? It takes you absolutely no time to say "by the way, I also posted this here" so that we can see what else you've already been told so we don't have to repeat information you already know. Plus, people googling your problem that come will want to know what you found out.
Quote:
Originally Posted by
JoeBrown
I presume it's noting the rules that you can't be members of 2 different programming forums.
Right, there's no way to make or enforce that kind of rule. It's just common politeness, which is usually a good idea to give to people who are willing to help you, for free, in their spare time.