Re: Nb 8.2RC DropDownButtonFactory behavior changed ? Problem solved as well.

Benno Markiewicz <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <CAA_aP4idM-8NaBopB4NaawbrKXWfTkPV=E_8zzj2S5H-4sZ=9g@mail.gmail.com>
Have you filed an issue for that? Perhaps you found a regression.

With kind regards, markiewb

2016-09-21 21:16 GMT+02:00 bruehlicke <[email protected]>:

> I have been using the DropDownButtonFactory as described in
> https://blogs.oracle.com/geertjan/entry/org_openide_
> awt_dropdownbuttonfactory1   and combined with ContextAware like
> http://wiki.netbeans.org/DevFaqDropdownMenuAddToolbarEnabled
>
> Working fine in 6.x but in 8.2 RC I just get a grey 32x32 box at the
> location of the dropdownbutton in the initial start of the application.
> First after an object is selected and the action is enabled the icon for
> the dropdownbox is rendered. If out of context again - it becomes the 32x32
> grey box again.
>
> The code used:
>  dropDownButton = DropDownButtonFactory.createDropDownButton(
>                 new ImageIcon(
>                 new BufferedImage(32, 32, BufferedImage.TYPE_BYTE_GRAY)),
>                 popup);
>
>         dropDownButton.setIcon(icon);
>
> Fix for 8.2RC:
>  dropDownButton = DropDownButtonFactory.createDropDownButton(
>                 icon,
>                 popup);
>
>
> i.e. do not call the .setIcon() method on the JButton.
>
>
> Again, just a low hanging fruit, but could be interesting if others have
> similar experience and why the dropDownButton.setIcon(icon) somehow is not
> working for showing the initial disabled state of the button.
>
>
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.