I am using java-gnome (Ubuntu 11.04, libjava-gnome-java 4.0.11) and am trying to set my Toolbar.setStyle(ToolbarStyle.BOTH_HORIZ); (which should show the icon and text from a stock item side by side) but it will not show text next to the icon. I was also seeing that Buttons with stock items were only showing the icon, even if I explicitly set the label for the Button. Only if I do not set a Stock item does the label show up. If I do ToolbarStyle.TEXT it shows the test, if I use ToolbarStyle.BOTH it shows the icon over the text, but ToolbarStyle.BOTH_HORIZ or leaving it blank (both_horiz is default in gnome) it just shows the icon.
I looked at some other GTK applications (not java-gnome) on my computer and they have both_horiz working correctly, and I have it set as default in gconf (/desktop/gnome/interface/toolbar_style)
You have to set the tool item to be “important”, otherwise the label will not show in both_horiz mode. Use
ToolItem.setIsImportant().