IllegalArgumentExceptions in VE [message #605692] |
Mon, 07 March 2005 14:20 |
Eclipse User |
|
|
|
Originally posted by: R.Kratz.exec-software.de
Hi.
I have a toolbar with some buttons. But when I add an icon to a
toolbar-button
(
URL url = getClass().getResource("img/ball_green_off.gif");
jButton1.setIcon(new ImageIcon(url));
)
, the warning-icon appears on the button with the following text:
icon : java.lang.IllegalArgumentException (IWAV0177E Expression "url" is
too complicated. - new ImageIcon(url))
The url-path is quite short and the icon can be found. I added the same
icon to a menuItem, without getting such a warning.
Could this be a bug in the VE?
Another IllegalArgumentException appears in a scrollpane with contains a
tree. When I put the standard tree control from the palette into the
scrollpane (generated code is: jScrollPane.setViewportView(getJTree());),
the tree is shown without exception. but when I create my own tree and
change the default code in the getJTree-Method
(jTree = new JTree();) to the following
(
DefaultMutableTreeNode top =
new DefaultMutableTreeNode("Root Node");
jTree = new JTree(top);
),
the tree cannot be painted in the ve anymore and a warning with an
illegalArgumentException occurs with the following text:
viewportView : java.lang.IllegalArgumentException (IWAV0167E Currently
methods need receiver (getJTree))
Can you explain this?
Many thanks,
Rebecca
|
|
|
Powered by
FUDForum. Page generated in 0.03531 seconds