Skip to main content

JDicPlus and setDefaultLightWeightPopupEnabled

4 replies [Last post]
jensbruhn
Offline
Joined: 2007-10-09

Hi folks,

when using JPopupMenu.setDefaultLightWeightPopupEnabled(false) and JdicPlus together in one application all the menus seem to be corrupt. They are only (partial) rendered at mouseover.

Any ideas?

Thanks,
jens

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
uta
Offline
Joined: 2007-01-10

If you are using heavyweight menus, please, switch to the "native heavyweight" paint mode by call
[b]BrComponent.setDefaultPaintAlgorithm(BrComponent.PAINT_NATIVE);[/b]

taylans
Offline
Joined: 2008-08-18

Hi

I had the same problem but setting the BrComponent... did not solve the problem.
I try the example demo BrowserFrame, where i set the menus to

private void initComponents()
{

..
bindingGroup.bind();

/////// here I added //////
toolsJMenu.getPopupMenu().setLightWeightPopupEnabled(false);
fileJMenu.getPopupMenu().setLightWeightPopupEnabled(false);
BrComponent.setDefaultPaintAlgorithm(BrComponent.PAINT_NATIVE);
////// here I added //////

pack();
..
}
before calling pack() in the function initComponents.

The menus are hw but not rendered correctly.
Os: Windows XP Pro
Java: jdk1.6.0_02

jensbruhn
Offline
Joined: 2007-10-09

this way i now force the popups to be heavyweight alltimes:

PopupFactory.setSharedInstance(new PopupFactory()
{
@Override
public Popup getPopup(final Component owner, final Component contents, final int x, final int y)
{
return new Popup(owner, contents, x, y)
{
// nix
};
}
});

jensbruhn
Offline
Joined: 2007-10-09

This seems to affect only mediumweight popups.
How can i force the PopupFactory to create heavyweight popups all the time?

Any ideas?

Message was edited by: jensbruhn