setting mnemonics in swing


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: setting mnemonics in swing

  1. #1
    Brad Guest

    setting mnemonics in swing


    From what I gather in Java, is that if you have a button with this label on
    it "New Window", the mnemonic will appear as New Window, because in java
    it finds the first character or instance of w, and underlines it (assuming
    w is the character you choose). Im wondering if there is any way to work
    around this, and get Java to differentiate between case size, or use arithmetic
    such as ascii codes, which are similar to C/C++. Do you know of any way
    I can render a mnemonic without using a method call?The method that sets
    mnemonics in buttons, menus, etc. is setMnemonic(char). In other words,
    how can I get Java to skip over the first lower case "w", and underline the
    Upper case "W"?

  2. #2
    Gerald Nunn Guest

    Re: setting mnemonics in swing

    AFAIK, there is no way to control where the mnemonic is placed in the
    string. There are several RFE's about this in Sun's bug parade.

    Gerald

    "Brad" <sublimeiscool_99@yahoo.com> wrote in message
    news:3a6604cf@news.devx.com...
    >
    > From what I gather in Java, is that if you have a button with this label

    on
    > it "New Window", the mnemonic will appear as New Window, because in java
    > it finds the first character or instance of w, and underlines it (assuming
    > w is the character you choose). Im wondering if there is any way to work
    > around this, and get Java to differentiate between case size, or use

    arithmetic
    > such as ascii codes, which are similar to C/C++. Do you know of any way
    > I can render a mnemonic without using a method call?The method that sets
    > mnemonics in buttons, menus, etc. is setMnemonic(char). In other words,
    > how can I get Java to skip over the first lower case "w", and underline

    the
    > Upper case "W"?




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center