Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 69121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:31:25+00:00 2026-05-10T19:31:25+00:00

We want to show a hint for a JList that the user can select

  • 0

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. COMMAND SYMBOL
(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 ); 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T19:31:26+00:00Added an answer on May 10, 2026 at 7:31 pm

    The symbol in question is avaiable through Unicode, and the HTML character sets. All you need to do is make your JLabel display HTML by starting its text string with <html> and then include the character code.

    JLabel label = new JLabel( '<html>&#8984; is the Apple command symbol.' ); 

    This will work on a Mac, but I’ve no idea what it’ll do on other platforms, although you do seem to have that covered off.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to show some children of div#options based on multiple values of the
I want hint of how can I perform a task at start up or
I am developing an Blackberry application. I want to show a hint text in
I want to use one data source (e.g. an Array) for multiple Datagrids that
that's my first time here. Hope someone can give us a hint! We are
I want to make a MFC Application that can only run form a know
I want show an information page after success db opartions. And after the info
I want show annotation view (above one of my pin) after load map. For
hii I want show a pop up Dialog box when i click on to
I'm using Drupal 7 and Views module in my site. And want show number

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.