This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 128184 - Image Choose does not accept relative paths
Summary: Image Choose does not accept relative paths
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-22 18:08 UTC by diane
Modified: 2009-05-25 20:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description diane 2008-02-22 18:08:49 UTC
Open a project that contains icons whose images use relative path, the IDE will show a blank in the Icon property
eventhough the code (generated by Netbeans 5.5.1) contains following:
    myCheckbox.setIcon(new javax.swing.ImageIcon(".\\images\\myIcon.png")); 
If one uses the External Image option in the Image Chooser and enters the relative path then clicks OK, the relative
path is converted to an absolute path. I realise there are other options (such as Image within Project in the Image
Chooser or Custom Code) but they all required making numerous changes in a lot of existing code that was build outside
of Netbeans 6.0
Comment 1 Peter Pis 2008-02-26 08:15:30 UTC
Reassigning to "form".
Comment 2 Jan Stola 2008-02-26 09:34:54 UTC
It really is not possible to enter a relative path in the current icon property editor. In fact, this use-case was 
unsupported in the previous version as well (it was possible to enter the relative path, but no icon was shown in 
design time). Unfortunately, there are some users (like you) who used this approach. It is much preferred to load the 
icons as resources (not as files). Anyway, we shouldn't silently ignore the relative path when old forms are loaded. We 
should either start to support it or at least suggest the user to change it to absolute path or resource name.