public void setDisplayedMnemonicIndex(int index)
                               throws IllegalArgumentExceptionProvides a
hint to the look and feel as to which character in the text should be
decorated to represent the mnemonic. Not all look and feels may support
this. A value of -1 indicates either there is no mnemonic, the mnemonic
character is not contained in the string, or the developer does not wish the
mnemonic to be displayed.
  The value of this is updated as the properties relating to the mnemonic
change (such as the mnemonic itself, the text...). You should only ever have
to call this if you do not wish the default character to be underlined. For
example, if the text was 'Save As', with a mnemonic of 'a', and you wanted
the 'A' to be decorated, as 'Save As', you would have to invoke
setDisplayedMnemonicIndex(5) after invoking setMnemonic(KeyEvent.VK_A).


    Parameters:
    index - Index into the String to underline
    Throws:
    IllegalArgumentException - will be thrown if index is >= length of the
text, or < -1
    Since:
    1.4
    See Also:
    getDisplayedMnemonicIndex()

----- Original Message -----
From: "lg.lima" <[EMAIL PROTECTED]>
To: "java-list" <[EMAIL PROTECTED]>
Sent: Wednesday, October 09, 2002 3:12 PM
Subject: Re: [java-list] SetMnemonic


> Olha, infelizmente não tem como sublinhar o 'D'.
> A própria API do java diz que o mnemonic é case INSENSITIVE, ou seja,
> não faz distinção entre maiusculas e minusculas. Ele vai sublinhar o
> primeiro 'D' que encontrar, seja maiusculo ou não.
>
> Luiz Henrique.
>
> > ---------- Mensagem original -----------
> >
> > De      : "Kelsei Biral" <[EMAIL PROTECTED]>
> > Para    : [EMAIL PROTECTED]
> > Cc      :
> > Data    : Wed, 09 Oct 2002 11:15:26 +0000
> > Assunto : [java-list] SetMnemonic
> >
> > Estou com um problema com o setMnemonic. Na frase "Algoritmo de Djis
> ktra"
> > quero sublinhar o ´D´ da palavra ´Djisktra´. Porém, quando mando com
> o
> > máscara a letra ´D´ ele sempre sublinha a letra da preposição ´de´.
> Alguém
> > sabe como fazer para que eu escolha a letra que quero sublinhar?
> > Grato...
> >
> >
> >
> > _________________________________________________________________
> > Tenha você também um MSN Hotmail, o maior webmail do mundo:
> > http://www.hotmail.com/br
> >
> >
> > ------------------------------ LISTA SOUJAVA -----------------------
> -----
> > http://www.soujava.org.br  -  Sociedade de Usuários Java da Sucesu-
> SP
> > dúvidas mais comuns: http://www.soujava.org.br/faq.htm
> > regras da lista: http://www.soujava.org.br/regras.htm
> > historico: http://www.mail-archive.com/java-list%40soujava.org.br
> > para sair da lista: envie email para java-list-
> [EMAIL PROTECTED]
> > --------------------------------------------------------------------
> -----
> >
> >
> >
>
>
> ------------------------------ LISTA SOUJAVA ----------------------------
> http://www.soujava.org.br  -  Sociedade de Usuários Java da Sucesu-SP
> dúvidas mais comuns: http://www.soujava.org.br/faq.htm
> regras da lista: http://www.soujava.org.br/regras.htm
> historico: http://www.mail-archive.com/java-list%40soujava.org.br
> para sair da lista: envie email para [EMAIL PROTECTED]
> -------------------------------------------------------------------------
>


------------------------------ LISTA SOUJAVA ---------------------------- 
http://www.soujava.org.br  -  Sociedade de Usuários Java da Sucesu-SP 
dúvidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
historico: http://www.mail-archive.com/java-list%40soujava.org.br
para sair da lista: envie email para [EMAIL PROTECTED] 
-------------------------------------------------------------------------

Responder a