We want to show a hint for a JList that the user can select multiple items with the platform dependent key for multiselect.
However I have not found any way to show the OS X COMMAND symbol in a JLabel, which means the symbol that's printed on the apple keyboard on the command key, also called apple key.
Here's a picture of the symbol I want to display on OS X.
(source: wikimedia.org)
Also I do want to have it platform independent.
I.e. something like
component.add( new JList() , BorderLayout.CENTER );
component.add( new JLabel( MessageFormat.format("With {0} you can "
+ "select multiple items",
KeyStroke.getKeyStroke( ... , ... ) ) ) , BorderLayout.SOUTH );
Where instead of the {0} there should appear above seen symbol...
Does any one of you guys know how to do this? I know it must be possible somehow since in the JMenuItems there is the symbol...
My own (non graphical solutions) looks like this:
add( new JLabel( MessageFormat.format(
"With {0} you can select multiple items" ,
System.getProperty( "mrj.version" ) != null ? "COMMAND" : "CTRL" ) ) ,
BorderLayout.SOUTH );