How Can I change the title of my java app on the osx menubar?

user2992757

I want to change the title of my java app on the osx menubar from the class name. I've tried putting this at the top of my main method but it does not work.

System.setProperty("apple.laf.useScreenMenuBar", "true");
System.setProperty("apple.awt.application.name", "app name");
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

Do I need a special library or something?

sorifiend

What you are doing looks correct, but you need to do it before any of your UI/window is created or AWT classes are loaded.

See this post: https://stackoverflow.com/a/33489386/1270000

Edit: note that behavior may be different when running your code in an IDE. So compile your code and test it rather than running directly from your IDE.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I definitively change the title of my Ember application?

From Dev

Clojure seesaw application: How to change menubar title from "main"

From Dev

How can I change my seller name In App Store?

From Dev

How can I change the locale for my app programmatically via Swift?

From Dev

How can I change the activity that started with my android app?

From Dev

How can I change the activity that started with my android app?

From Dev

How can I change the browser title?

From Dev

How can I dynamicly change the <title> tag?

From Dev

How can I change the title of the Project Explorer?

From Dev

How can I change the title of a Fragment without changing the title of the MainActivity?

From Dev

Android: How can I change title in action bar, but keep app name the same?

From Dev

How can I change the title text color of the action bar when the app is paused?

From Dev

How I can access to menubar and sub ment on another application from my c# application?

From Dev

How can I change the colour of my window background randomly in java?

From Dev

How can I retrieve a list of changes for my Java web app?

From Dev

Added a drop down triangle to my UIButton with a subclass, how can I prevent it from stretching when I change the title?

From Dev

Added a drop down triangle to my UIButton with a subclass, how can I prevent it from stretching when I change the title?

From Dev

How to Change Color of NSWindow Title Bar in OSX

From Dev

I made my own webapp, how to change the title (or whatever)?

From Dev

How do I add a menubar to my WTL dialog window?

From Dev

How can I change the C++ compiler in Matlab over OSX

From Dev

How can I change the line-height in Terminal OSX

From Dev

How can I embed CEF3 into my OSX application?

From Dev

How can I play a synth sound in a C++ app on OSX?

From Dev

How can I change the title of front-page in Drupal 8?

From Dev

How can I change the back button title in ionic framework?

From Dev

How can I change dialog title color in jquery ui?

From Dev

How can I change the NavigationController.title.font on the Storyboard?

From Dev

How can i change in TabControl the font size of a tab title?

Related Related

  1. 1

    How can I definitively change the title of my Ember application?

  2. 2

    Clojure seesaw application: How to change menubar title from "main"

  3. 3

    How can I change my seller name In App Store?

  4. 4

    How can I change the locale for my app programmatically via Swift?

  5. 5

    How can I change the activity that started with my android app?

  6. 6

    How can I change the activity that started with my android app?

  7. 7

    How can I change the browser title?

  8. 8

    How can I dynamicly change the <title> tag?

  9. 9

    How can I change the title of the Project Explorer?

  10. 10

    How can I change the title of a Fragment without changing the title of the MainActivity?

  11. 11

    Android: How can I change title in action bar, but keep app name the same?

  12. 12

    How can I change the title text color of the action bar when the app is paused?

  13. 13

    How I can access to menubar and sub ment on another application from my c# application?

  14. 14

    How can I change the colour of my window background randomly in java?

  15. 15

    How can I retrieve a list of changes for my Java web app?

  16. 16

    Added a drop down triangle to my UIButton with a subclass, how can I prevent it from stretching when I change the title?

  17. 17

    Added a drop down triangle to my UIButton with a subclass, how can I prevent it from stretching when I change the title?

  18. 18

    How to Change Color of NSWindow Title Bar in OSX

  19. 19

    I made my own webapp, how to change the title (or whatever)?

  20. 20

    How do I add a menubar to my WTL dialog window?

  21. 21

    How can I change the C++ compiler in Matlab over OSX

  22. 22

    How can I change the line-height in Terminal OSX

  23. 23

    How can I embed CEF3 into my OSX application?

  24. 24

    How can I play a synth sound in a C++ app on OSX?

  25. 25

    How can I change the title of front-page in Drupal 8?

  26. 26

    How can I change the back button title in ionic framework?

  27. 27

    How can I change dialog title color in jquery ui?

  28. 28

    How can I change the NavigationController.title.font on the Storyboard?

  29. 29

    How can i change in TabControl the font size of a tab title?

HotTag

Archive