pheromix
pheromix

Reputation: 19347

How to write the copyright symbol?

I want to put a copyright on my Form. I tried to write ©

private Label copyrightL = new Label("©");

but it did not work. So how to write the © symbol ?

Upvotes: 2

Views: 16378

Answers (4)

Basil Bourque
Basil Bourque

Reputation: 340070

Unicode code point number

Every character defined in Unicode has a unique integer number assigned to it.

Determine the number for your desired character. The COPYRIGHT SIGN is decimal 169, hexadecimal A9.

Create a single-character string.

int copyrightSymbolCodePoint = 169 ;
String s = Character.toString( copyrightSymbolCodePoint ) ;

Or, append using a StringBuilder.

StringBuilder sb = new StringBuilder( "Copyright symbol is " ) ;
an.appendCodePoint( copyrightSymbolCodePoint ) ;
String output = sb.toString() ;

Upvotes: 1

Acchim Chupa
Acchim Chupa

Reputation: 1

Hold alt key Then press 0169 in numeric keyboard Release alt Enjoy

Upvotes: -1

Namikaze Badri
Namikaze Badri

Reputation: 1

Is it Java?, try using JLabel and use private JLabel copyrightL = new JLabel("<html><body>&copy;</body></html>");

Upvotes: -2

albciff
albciff

Reputation: 18517

Try with unicode symbol:

private Label copyrightL = new Label("\u00a9");

Hope this helps,

Upvotes: 12

Related Questions