Method getResource(String name)
Return type: java.net.URL
Member of: java.lang.Class
[api documentation ] [ main menu]

Examples of how the element is used (one line per example):
[add your own example]

1 static final ImageIcon FOLDER = new ImageIcon(String.class.getResource("/uchicago/src/simbuilder/images/Folder.gif"));
2 static final ImageIcon ACTION = new ImageIcon(String.class.getResource("/uchicago/src/simbuilder/images/Enter.gif"));
3 ImageIcon certrevokedIcon = new ImageIcon (getClass ().getResource ("/com/ibatis/secrets/gui/images/certrevoked.gif"));
4 ImageIcon certificateIcon = new ImageIcon (getClass ().getResource ("/com/ibatis/secrets/gui/images/certificate.gif"));
5 private static ImageIcon iOpen = new ImageIcon(ConfigurationPanel.class.getResource("openFile.gif"));
6 private static ImageIcon iSave = new ImageIcon(Compiere.class.getResource("images/Save16.gif"));
7 private static final ImageIcon publicIcon = new ImageIcon (AutoCommentPanel.class.getResource ("/org/netbeans/modules/javadoc/comments/resources/public.gif")); // NOI18N
8 private static final ImageIcon protectedIcon = new ImageIcon (AutoCommentPanel.class.getResource ("/org/netbeans/modules/javadoc/comments/resources/protected.gif")); // NOI18N
9 leftTop = new ImageIcon(this.getClass().getResource("left-top.png"));
10 private final Icon _pkIcon = new ImageIcon(ColumnListCellRenderer.class.getResource("pk.gif"));
11 super("Regenerate Preview", new ImageIcon(c.getClass().getResource("/foa/images/preview/regenerate.gif")));
12 = new ImageIcon(ShadowPopupBorder.class.getResource("shadow.png")).getImage();
13 result.setIconImage( ImageLoader.get().getImage( AddressViewerDialog.class.getResource( "/org/xngr/xservice/address/icons/AddressIcon.gif")).getImage());
14 putValue(Action.SMALL_ICON, new ImageIcon(getClass().getResource("icons/all-queries.gif")));
15 new ImageIcon(getClass().getResource("Experiment16t.gif"))) {
16 ImageIcon icon = new ImageIcon( getClass().getResource("/resources/icon/icon.jpg") );
17 = new ImageIcon( this.getClass().getResource(
18 URL url = this.getClass().getResource("/microscope.gif");
19 getResource("/images/docs.gif"));
20 File sourceFile = new File(getClass().getResource("/org/txt2xml/gui/sample.txt").getFile());
Java and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other Countries.