Looking at the sources, the setFont() method is accepting one String, so I would try:
elements.bean_tree.setFont(‘Verdana,0,10’);
There is also an overriden method with a Font, so:
elements.bean_tree.setFont(new Packages.java.awt.Font(‘Verdana’,0,10)); // the first param is a String, the 2 others are int.
The way to do it is definitely:
elements.bean_tree.setFont(‘Verdana,0,10’);
or
elements.bean_tree.setFont(new Packages.java.awt.Font(‘Verdana’,0,10));
The 2 method implementations are straight-forward, so if none of these work, I would call it a bug, probably creeping elsewhere…
Have you tried updating the bean after setting the font?
Actually, it looks like the function is actually doing something. Specifically, putting the font settings of the bean back to default (either by overwriting or by removing entirely).
IE, If you set the font of the bean in design time and then do a beanxxx.setFont(…) at run time, the run time call wipes out the design time setting.