java - Making a custom icon for a JFrame -
well wondering if make icon image jframe. know posible, because, let me say, not digging java logo.
well if hava use frame object will.
can tell me, know possible!
first, have have image file on computer. can named anything. example, call 1 "pic.jpg". next, need include in files application using. example, if you're using netbeans, click on "files" in left hand side of ide (not file in menu, mind you). drag picture's file on folder houses main package. include available use in code. inside method define jframe, can create image this:
image frameimage = new imageicon("pic.jpg").getimage();
you can set iconimage frame this:
jframe frame = new jframe("title"); frame.seticonimage(frameimage);
hope that's helpful.
note: reason image object has created because image abstract , cannot instantiated saying new image();
props you, btw, kid. wish have started learning programming when age. keep @ it!
Comments
Post a Comment