Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm working in eclipse and I have made an application without name and icon. When i start the application it's a really creepy name displaying in the upper left corner (Mac). It's some thing like. I wonder how I can change this to my own name. Second question is how i can change the icon. Can I do that in eclipse?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
148 views
Welcome To Ask or Share your Answers For Others

1 Answer

If you're using JFrames, you can try setting the icon image as follows.

frame.setIconImage(img); 

Also, by name it sounds a bit like you mean the frame's title. When you create the a frame, you can set the title as follows:

Frame frame = new JFrame("Title goes here");

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...