The Artima Developer Community
Sponsored Link

Java Answers Forum
Icon vertical position in a JTextPane

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Frantz Fischer

Posts: 1
Nickname: hereps
Registered: Mar, 2002

Icon vertical position in a JTextPane Posted: Mar 11, 2002 5:01 AM
Reply to this message Reply
Advertisement
hi,

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.

Cheers.

Topic: how to check web page existance? Previous Topic   Next Topic Topic: How to make a  class instance ?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use