Reputation: 1059
When I run my app (in Netbeans) the title of the app (in the top left corner of my OS) is the name of the java class (not the name I want or the name of the project).
If there a way to change this so it is more meaningful? I am sure there should be but I can't seem to find out how..
I can change the title of the window that opens but I want the name in the top left corner to be different (i.e. the programs name).
Hope this is clear?
Thanks
EDIT WITH SCREENSHOT
OK in this pic the app is running in the foreground and Netbenas behind.
You can see the name I want changed is 'photosjFrame' - to something more meaningful for my app like "Photo Databse" etc etc
Hope this makes sense now…
Thanks
UPDATE 2Here is another screenshot that I hope makes sense…
I have tried:
this.setTitle("Some meaningful title");
and
super("Some meaningful title");
but as you can see from the screen shot they change the title of the window open not of the application name (or whatever it is called)…
Thanks
Upvotes: 1
Views: 3171
Reputation: 91
Although your question is not as clear as it could be, and the screenshot still doesn't really show us what you desire, is it not as simple as calling...:
this.setTitle("Some meaningful title");
from within the jframe code, or...:
yourFrame.setTitle("Some meaningful title");
from wherever else is appropriate...
To change what text is shown in the Mac taskbar (top left), try adding the following lines:
System.setProperty("apple.laf.useScreenMenuBar","true");
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Some meaningful name");
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName())
Or, in newer versions of Java I beleive you can either:
Upvotes: 1