I used the following code:
JComboBox cb=new JComboBox(); JLabel label = new JLabel("für"); label.setDisplayedMnemonic('ü'); label.setLabelFor(cb);
This code does not work. However, if I put the mnemonics on "f" instead of "ü", it works fine. There is an API in jdk7 that allows this, but I could not find such an API in jdk 6: JDK 7 api: http://docs.oracle.com/javase/7/docs/api/java/awt/event/KeyEvent. html # getExtendedKeyCodeForChar% 28int% 29
DisplayedMnemonic is fine. "ü" is underlined, but:This will installKeyboardActions() ine BasicLabelUI for the inputMap of your JLabel using KeyStroke: alt pressed UNKNOWN , which will definitely not work.
installKeyboardActions()
BasicLabelUI
alt pressed UNKNOWN
Source: https://habr.com/ru/post/1383806/More articles:Add to URI / URL without refreshing the page using JavaScript / jQuery - javascriptCannot access SIM phonebook in Nokia - java-meHow to programmatically enable Network Discovery in Windows? - c #Apply a function to each item in one list, using an item from another list as an argument? - scalaSyntax for converting jstring and adding - javaHow to allow an exception when building a package? - androidUsing the visual database to access the subfolder in the inbox? - vbaUsing internal HTML with ASP: Button? - htmlIs there anyway Android app development using WPF? - androidSSRS 2008 dataset moves up and down - datasetAll Articles