This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes getResources() keep changing path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "getResources() keep changing path" Watch "getResources() keep changing path" New topic

getResources() keep changing path

Kay Lee

Joined: Apr 27, 2013
Posts: 16

code is auto-generate...
the code keep changing to...

notice the path there is javaTest/ included...

ive been developing this GUI in other project, then there is this project i need to use the GUI so i just copy the package into my current project.

at first there is error for getResource(),i figure that if i change the path this error will gone.

yes, it work but then after several runtime it change back to original code(second code).

How to prevent the code from change back to original code?? TQ
Kay Lee

Joined: Apr 27, 2013
Posts: 16
actually, i think it happen everytime i close netbeans and open again...code change.
Kay Lee

Joined: Apr 27, 2013
Posts: 16
and everytime i have to change the path again and again...
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9993

Looks like netbeans issue and not swing related. Moving to a more appropriate forum

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Ken Masters

Joined: May 14, 2013
Posts: 8
Try to enter the full path with file:// at the beginning.

I agree. Here's the link:
subject: getResources() keep changing path
Similar Threads
Picture as Button?
Putting an image in a JLabel
to change the button picture present in the resources folder in netbeans on click
Images in jar
Thread.sleep problem (change image) Java