Re: constraints attribute doesn't work for menubar
[email protected] Mon, 22 Aug 2005 18:11:41 +0200
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Message-ID | <[email protected]> |
I agree it's not used that much (though we do use it) but this can be seen rather as a framework consistency issue then a practical one. Regards, Vitali 2005/8/22, [email protected] <[email protected]>: >=20 > Hello Vitali, >=20 > this sounds sensible and useful to me. Allthough the constraints of a men= u bar seems to be not used *that* much (or this would have been discovered = earlier) I would like to integrate it. >=20 > Wolf, any objections? >=20 > Frank >=20 > List for Users of Carlsbad Cubes' Technologies and Products <Forum@carlsb= adcubes.com> schrieb am 22.08.05 17:06:49: > > > > Hello, > > > > specifying constraints attribute for menubar tag doesn't have any affec= t. > > here is the possible fix for the problem. Parser.addChild method > > should be modified like this: > > > > // Set a JMenuBar for JFrames, JDialogs, etc. > > // > > if (component instanceof JMenuBar) { > > try { > > Method m =3D parent.getClass().getMethod("setJMenuBar", new > > Class[]{JMenuBar.class}); > > m.invoke(parent, new Object[]{component}); > > } catch (NoSuchMethodException e) { > > ! if (constrains =3D=3D null) { > > ! parent.add(component); > > ! } > > ! else { > > ! parent.add(component, constrains); > > ! } > > } catch (Exception e) { > > // intentionally empty > > } > > > > Regards, > > Vitali > > > > _______________________________________________ > > Forum mailing list > > [email protected] > > http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com >=20 >=20 >=20 > _______________________________________________ > Forum mailing list > [email protected] > http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com >