it could but i dont think that is really easy to do because some are a bit internal
But if you know Swing and the JEditorPane/StyleEditorKit then i think something like this:
I notice a problem in the userinterface, it is not displaying the actual status of (for instance) the bold setting.
See first picture below :
i inserted 4 lines of text and then selected part of the second line and set it to underlined.
[attachment=1]p123.png[/attachment]
then i put the cursor at the end of the last line and start typing. The Underline icon is still highlighted.
However, when is start typing the text is not underlined.
When i then deselect the underline setting and start typing the typed text gets underlined.
See second picture.[attachment=0]p45.png[/attachment]
This is very confusing for the user.
Also when the user puts the cursor in an underlined section of the text, the underline icon in the toolbar is not activated.
Heh, I see the function toolbar and think immediately about plugins.window.. Totally not seeing that you wrote plugins.menubar. .
The menubar plugin was integrated into the window plugins a few versions back.
var win = application.createWindow(application.getUUID().toString(), JSWindow.MODAL_DIALOG);
win.title='Edición Modelo Contrato';
win.showTextToolbar(true); // THIS DOES THE TRICK
forms.frmEdicionContratoLOPD_GSDespachos.controller.show(win);