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 44482 - "com.sun.java.swing.plaf.gtk.GTKLookAndFeel/icons/Error.gif not found." in console
Summary: "com.sun.java.swing.plaf.gtk.GTKLookAndFeel/icons/Error.gif not found." in co...
Status: CLOSED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 4.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: Martin Krauskopf
URL: http://bugs.sun.com/bugdatabase/view_...
Keywords: GTK
Depends on:
Blocks:
 
Reported: 2004-06-07 20:25 UTC by Jesse Glick
Modified: 2008-12-22 16:54 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NbPresenter-patch (1.06 KB, text/plain)
2005-03-10 04:02 UTC, Martin Krauskopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-06-07 20:25:31 UTC
040606 and earlier, JDK 1.5.0 b54, GTK. This
message appears in my console every time an
exception dialog is shown. Annoying. If the icon
is necessary, we should ship it (or correct the
path), otherwise we should suppress the warning.
Comment 1 _ tboudreau 2004-06-21 23:02:04 UTC
I think this is actually the form editor making some assumptions - I've seen a few of these, 
and it looks like it assumes there will be a bunch of icons there for random things, with 
similar names across different look and feels.
Comment 2 David Simonek 2004-06-22 12:48:44 UTC
OK, so I'm passing to Tim and ccing form guys.
Comment 3 _ tboudreau 2004-06-26 23:02:07 UTC
I *think* this bug belongs to the form editor - no code I know if in
core/openide asks for these icons, and I believe I've seen code that
does in the form editor, though I forgot what for.
Comment 4 Jesse Glick 2004-06-26 23:51:44 UTC
Really? I see this message frequently, and I don't use the form editor
often.
Comment 5 _ tboudreau 2004-06-27 01:28:53 UTC
Just that one or the whole laundry list (15-20 not found images)?
Comment 6 Jesse Glick 2004-06-27 01:34:37 UTC
Just this one.
Comment 7 Jesse Glick 2004-06-27 19:14:14 UTC
Just saw a message about Inform.gif:

<<.....>>
<<some informational stack traces, to log file only>>
com.sun.java.swing.plaf.gtk.GTKLookAndFeel/icons/Inform.gif not found.
*********** Exception occurred ************ at 2:10 PM on Jun 27, 2004
<<stack trace that was shown in a dialog>>
com.sun.java.swing.plaf.gtk.GTKLookAndFeel/icons/Error.gif not found.
<<end of messages.log>>
Comment 8 _ tboudreau 2004-06-27 19:37:24 UTC
On restart with a form open, I get 15-20 of these - "harddrive.gif", etc.
Comment 9 Jan Stola 2004-07-07 12:43:41 UTC
The messages produced by form were caused by an incorrect resolution
of some UIDefaults' lazy values. For example the key
"OptionPane.errorIcon" maps to a lazy value that (when resolved)
attempts to load Error.gif file from its look and feel.
Unfortunately GTKLookAndFeel doesn't provide this icon and
the key is there because it is added by its superclass
BasicLookAndFeel.

We fixed the incorrect resolution in form module, but there
seem to be another places where we directly or undirectly
resolve those icons (e.g. in exception dialog) => reassigning
back to core.
Comment 10 David Simonek 2004-07-29 15:34:48 UTC
Passing back to Tim.
Comment 11 David Simonek 2004-10-21 14:17:13 UTC
Passing to Martin.
Comment 12 Martin Krauskopf 2005-03-10 04:02:04 UTC
I think that the reason is that all LookAndFeels except GTKLookAndFeel use
SwingUtilities2.makeIcon(..., "icons/*.gif") to fill up values into an
UIDefaults. GTKLookAndFeel use its own mechanism (see GTKStyle class: e.g. new
GTKStockIcon("gtk-dialog-question", 6)). So when we use BasicOptionPaneUI in
NbPresenter it will probably tries to wrongly use "icons/*.gif" (which works for
all others LookAndFeels). It is all surely more intricated, e.g. there are
OptionPaneUIs for all L&F except, again, GTK. So GTK L&F probably works little
differently due to multiple Themes. Maybe that someone will want to continue in
investigation of this issue (or I will later).
So the easiest way is probably conditionally use own BasicOptionPaneUI when GTK
is not used (see attached patch) which makes GTK dialogs a little ugly. But
there could be a better solution.

It also seems that this problem is on more places that just this case. No
perfect solution, not fixed on all places - leaving open. Any hints and comments
welcome :)
Comment 13 Martin Krauskopf 2005-03-10 04:02:58 UTC
Created attachment 20728 [details]
NbPresenter-patch
Comment 14 _ tboudreau 2005-03-10 05:07:00 UTC
The JDK team has been very good about fixing stuff like this (UIManager issues, etc.).  Recommend filing a 
bug with them (we'll still need a patch and a null check, but whether they like it or not, this stuff is de-
facto API).
Comment 15 Martin Krauskopf 2005-03-14 23:06:07 UTC
I found already filled bug which could solve our problem as well (jdk bug
4989521). Even UIManager.getIcon("OptionPane.errorIcon"); doesn't work when
GKTLookAndFeel is in use.
Comment 16 Martin Krauskopf 2005-08-22 10:54:23 UTC
Cool. Fixed in b48. It is not worth to workaround it for <b48 IMO.
Comment 17 Marian Mirilovic 2005-08-22 12:52:18 UTC
Verified