Skip to content

Commit

Permalink
Dynamic Upload of Pic
Browse files Browse the repository at this point in the history
  • Loading branch information
TejeshP authored and TejeshP committed Sep 10, 2013
1 parent a5edeb8 commit c2787f8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions battleship/.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,11 @@
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<linkedResources>
<link>
<name>src/images/BS.jpg</name>
<type>1</type>
<location>/Users/Firefly/Work/workspace/battleship/src/images/BS.jpg</location>
</link>
</linkedResources>
</projectDescription>
Binary file modified battleship/bin/GameDesign/UserInterface$ContentPane.class
Binary file not shown.
File renamed without changes
4 changes: 2 additions & 2 deletions battleship/src/GameDesign/UserInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ public class ContentPane extends JPanel {

public ContentPane() {
try {
String pathToImage = "/Users/Firefly/battleShip/battleship/src/GameDesign/BS.jpg";
image = ImageIO.read(new File(pathToImage));
URL pathToImage = this.getClass().getResource("/images/BS.jpg");
image = ImageIO.read(pathToImage);
} catch (IOException e) {
e.printStackTrace();
}
Expand Down
Binary file added battleship/src/images/BS.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c2787f8

Please sign in to comment.