Does anybody know how to set the vertical position of an icon in a JTextPane ? Here is a piece of my code :
Style s = Historique.addStyle("icon", regular); StyleConstants.setAlignment(s, StyleConstants.ALIGN_CENTER); StyleConstants.setIcon(s, new ImageIcon("picture.jpg"));
I insert this icon into a document through the insertstring method. Is there any method to set the vertical alignement ? I would like to center it instead of aligning it with the text bottom.