Still pretty green on clojure, java, layouts etc.
On a miglayout I have this line to insert an icon on Jlabel:
(JLabel. "" "C:\\MyPriject\Pictures\\TCM00.jpg")
I am getting the following error:
#<CompilerException java.lang.IllegalArgumentException: No matching ctor found for class javax.swing.JLabel (NO_SOURCE_FILE:901)>
Any help will be highly appreciated.
JLabelhas no constructor that takes two String arguments.If you want just an icon (and no text), there is a constructor that takes one
Icon. The classImageIcon(which implementsIcon) has a constructor that takes a filename String. So this should work:See the javadoc:
http://docs.oracle.com/javase/1.5.0/docs/api/javax/swing/JLabel.html
http://docs.oracle.com/javase/1.5.0/docs/api/javax/swing/ImageIcon.html