-
-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from xdvrx1/master
Patch: `setIconImage`
- Loading branch information
Showing
3 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package simplejavacalculator; | ||
|
||
import java.io.*; | ||
import java.awt.image.BufferedImage; | ||
import javax.imageio.ImageIO; | ||
import java.awt.*; | ||
|
||
/** | ||
*This class will return an image | ||
*from a binary data. | ||
*/ | ||
class BufferedImageCustom { | ||
public Image imageReturn() | ||
throws IOException { | ||
Image image; | ||
|
||
InputStream bis = getClass().getResourceAsStream("/icon/icon.png"); | ||
BufferedImage bImage2 = ImageIO.read(bis); | ||
image = bImage2; | ||
|
||
return image; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters