Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » ImageIcon(ImageIcon ii = new ImageIcon(this.getClass().getResource("/resources/star.png"));)
ImageIcon [message #936010] Sun, 07 October 2012 15:28 Go to next message
Alexandre Brabant is currently offline Alexandre BrabantFriend
Messages: 5
Registered: October 2012
Junior Member
ImageIcon ii = new ImageIcon(this.getClass().getResource("/resources/star.png"));

It does not work and i don't understand why.

Exception in thread "main" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(ImageIcon.java:205)
at star.Board.<init>(Board.java:26)
at star.Star.<init>(Star.java:9)
at star.Star.main(Star.java:21)
Re: ImageIcon [message #936438 is a reply to message #936010] Mon, 08 October 2012 02:18 Go to previous messageGo to next message
Jeeeyul Lee is currently offline Jeeeyul LeeFriend
Messages: 117
Registered: July 2009
Location: Seoul
Senior Member

Why did you use ImageIcon of Swing?
Re: ImageIcon [message #936966 is a reply to message #936438] Mon, 08 October 2012 14:26 Go to previous messageGo to next message
Alexandre Brabant is currently offline Alexandre BrabantFriend
Messages: 5
Registered: October 2012
Junior Member
I use imageicon of Swing because i follow a tutorial game2D with Swing...
Re: ImageIcon [message #937449 is a reply to message #936966] Tue, 09 October 2012 01:20 Go to previous messageGo to next message
Jeeeyul Lee is currently offline Jeeeyul LeeFriend
Messages: 117
Registered: July 2009
Location: Seoul
Senior Member

You should have to post quetions about Graphiti.
AFAIK, graphiti doesn't support Swing yet.
What if you trying to use graphiti on Swing, let me know link of the tutorial.
Re: ImageIcon [message #938192 is a reply to message #937449] Tue, 09 October 2012 16:41 Go to previous message
Alexandre Brabant is currently offline Alexandre BrabantFriend
Messages: 5
Registered: October 2012
Junior Member
I'm sorry, i didn't realise that i was in a specific forum. I have jus posted my question in the newcomers forum.
I caonot give you the link to my tutorial because it is not from eclipse.org
Previous Topic:BoxRelativeAnchor and connection end points
Next Topic:Nesting diagrams
Goto Forum:
  


Current Time: Fri Apr 19 20:08:51 GMT 2024

Powered by FUDForum. Page generated in 0.03166 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top