Icons on the custom widgets in VE are not visible [message #87874] |
Wed, 20 April 2005 11:59  |
Eclipse User |
|
|
|
Hello,
I have my own custom widget: panel with a button; the button has an icon
on it.
If I test my component with "Run |Java Application" I can see the icon.
If I drop my component from the palette in VE in the debug mode my icon is
not visible.
What can I do to make my icon visible ? Do I have to set some paths ?
Thank you :-)
Elena
|
|
|
|
Re: Icons on the custom widgets in VE are not visible [message #87961 is a reply to message #87888] |
Thu, 21 April 2005 02:40   |
Eclipse User |
|
|
|
Hello,
here is the code below. I hope that the formatting is ok. You can see that
my "plusMinusButton" has an icon. And the icon is in a folder "icons" in
my plugin-project.
Thanks
Elena
------------------------------------------------------------ ----------------
public class ButtonPlusPanel extends JPanel
{
public ButtonPlusPanel()
{
super();
}
public ButtonPlusPanel(ActionListener controller, String actionCommand,
String[] resourceNames, String[] resourceKeys, String[] imageNames)
{
super();
ButtonPanel buttonPanel = new ButtonPanel(controller, resourceNames,
resourceKeys, imageNames, 6, 1, 1);
JButton plusMinusButton = new JButton(new
ImageIcon("icons/Close_Button.gif"));
this.add(buttonPanel);
this.add(plusMinusButton);
this.setVisible(true);
}
}
|
|
|
|
Re: Icons on the custom widgets in VE are not visible [message #607195 is a reply to message #87874] |
Wed, 20 April 2005 13:52  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
What does the code look like that sets icon on the button? In what
method is this code called from?
Elena wrote:
> Hello,
>
> I have my own custom widget: panel with a button; the button has an icon
> on it.
> If I test my component with "Run |Java Application" I can see the icon.
>
> If I drop my component from the palette in VE in the debug mode my icon
> is not visible.
>
> What can I do to make my icon visible ? Do I have to set some paths ?
>
>
>
>
> Thank you :-)
>
> Elena
>
--
Thanks,
Rich Kulp
|
|
|
Re: Icons on the custom widgets in VE are not visible [message #607200 is a reply to message #87888] |
Thu, 21 April 2005 02:40  |
Eclipse User |
|
|
|
Hello,
here is the code below. I hope that the formatting is ok. You can see that
my "plusMinusButton" has an icon. And the icon is in a folder "icons" in
my plugin-project.
Thanks
Elena
------------------------------------------------------------ ----------------
public class ButtonPlusPanel extends JPanel
{
public ButtonPlusPanel()
{
super();
}
public ButtonPlusPanel(ActionListener controller, String actionCommand,
String[] resourceNames, String[] resourceKeys, String[] imageNames)
{
super();
ButtonPanel buttonPanel = new ButtonPanel(controller, resourceNames,
resourceKeys, imageNames, 6, 1, 1);
JButton plusMinusButton = new JButton(new
ImageIcon("icons/Close_Button.gif"));
this.add(buttonPanel);
this.add(plusMinusButton);
this.setVisible(true);
}
}
|
|
|
|
Powered by
FUDForum. Page generated in 0.03093 seconds