import java.awt.Color; import javax.swing.ImageIcon; import javax.swing.JFrame; public class Main { public static void main(String[] args) { // JFrame = a GUI window to add components to JFrame frame = new JFrame(); //creates a frame frame.setTitle("JFrame title goes here"); //sets title of frame frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //exit from application frame.setResizable(false); //prevent frame from being resized frame.setSize(420,420); //sets the x-dimension, and y-dimension of frame frame.setVisible(true); //make frame visible ImageIcon image = new ImageIcon("logo.png"); //create an ImageIcon frame.setIconImage(image.getImage()); //change icon of frame frame.getContentPane().setBackground(new Color(0x123456)); //change color of background } }
@ebrimadrammeh4 ай бұрын
Well understand, thank you so much
@phuongdonguyen6327 Жыл бұрын
Best java tutorial playlist on KZbin, I want to thank for what you've done, keep up good work!
@kemann38153 жыл бұрын
Man, i wish everyone whos lookin to learn lava finds this channel! Its just absolutely the best!
@sudharshan_reddy_kakarla3 жыл бұрын
It's Java . 😂.lava
@kemann38153 жыл бұрын
@@sudharshan_reddy_kakarla the funny thing is that i was looking at your comment trying to figure out if it was a java refrence or not, then i noticed my typo lmao Yea i would import and use the "java.😂.lava" class in my code too lol
@tngflash28143 жыл бұрын
"Let's set the size by 420 to 420 because that's a funny number." LMAO. This had me laffin.
@pavelkvasnicka6856 Жыл бұрын
This is the best Java tutorial for beginners, so you can learn Java and English in one hit. Please keep going! I vote for Java advance tutorial. Thanks a lot Bro
@djrkm928113 күн бұрын
You're doing gods work by creating Java FX / GUI vids cuz my stupid uni wants us to learn this and I didnt understand shit in the lectures but I found this. Thx
@KaviBalan0074 ай бұрын
I am really glad that I find your youtube channel. You are saviour man
@rock67663 жыл бұрын
very fun very interactive lessons as well as structural knowledge, love it man 👍
@gemmarosemolina2082 Жыл бұрын
I really like the way your patience of explaining.
@shankar74352 жыл бұрын
Never got this idea of using subclass of JFrame instead of repeating the same code several times in different projects. Thanks Bro.
@paniccookie_2 жыл бұрын
You are carrying my friend and I in our java comp sci class, THANK YOU!!!
@BekirSARIKAYA Жыл бұрын
Thank you Bro for sharing this video.
@k4nyeeasto1993 жыл бұрын
Honestly thank you so much, my java skill got improved by watching you
@Sleepmedicine-kz9cw Жыл бұрын
You are great, these videos are precious. Thank you bro.
@jerryagsunod7053 Жыл бұрын
best ever tutorial i've ever watch, thank you Bro Code
@sankartechpro4 жыл бұрын
❤️Superb, good explanation, keep it up. 👏👍👌
@bharathpavurala78172 жыл бұрын
We will support you.... Keep rocking broooo😎
@renecabuhan16753 жыл бұрын
Bro I recommended ur videos to my classmates they like it.
@BroCodez3 жыл бұрын
Thank you rene!
@bitks73753 жыл бұрын
Bro keep this up, i really like your way of explaining everything. I just began to code, your videos will guarantee me a job in the future :)
@adaofsantos2 жыл бұрын
Nice job, man! I like your tutorials too much. Congratulations for the beautiful job!
@jasonjacobs91742 жыл бұрын
I am loving this channel.
@dianamilenaarchilacordoba46323 ай бұрын
great video!!! I'm infinitely grateful for your dedication and big heart to share this knowledge with the world. Thank you soo much
@cnarkaya6294 ай бұрын
why are you such a chad? Thanks bro!
@robertmanigault6253 жыл бұрын
Another excellent video, Bro. Thanks. BTW, proud subscriber here.
@NatyTor2 жыл бұрын
man im so like your video!! thanksss
@Simis9992 жыл бұрын
Bro is our shining star in the middle of the night
@smrtfasizmu61613 жыл бұрын
This is also a nice way to understand the keyword this. Keyword this basically just pretends to be an instance of the class in which you are in.
@D_Ghandi5 ай бұрын
Helping you, to keep helping me ⛈
@Ahmed_Emad_ Жыл бұрын
Thank You for ease the information.
@mahdib93614 жыл бұрын
Please Make Tuturial For JAVAFX
@rohitbharatbhandwalkar85832 жыл бұрын
I thought starting GUI would be boring but guess what, I like this!!!
@kaushalprasadyadav92422 жыл бұрын
you are great. please make videos for mobile app
@pro-ck1qg3 ай бұрын
the best tutorial
@jasonemmettmyersАй бұрын
at 10:49, I have it exactly as you have it, and I get an error, indicating that there should be a semi-colon after MyFrame()
@toemilio3 ай бұрын
helped me with my cs30 class legend
@dryrun45013 жыл бұрын
Hey you yeah I'm talking to you ! You r the best 🙏❣️
@zari_7232 жыл бұрын
Thanks for another great vid
@enciuraluca31003 жыл бұрын
Thank you sooooo much for all the videos
@justinbanza47513 жыл бұрын
Thank you for this video
@simon-elrondir8621 Жыл бұрын
Thank you for teaching this to us. The time you put into these videos really shows :)
@ian66092 жыл бұрын
🙉🙉 i really like the brocode did it
@mahadevbansode41134 жыл бұрын
Bro you are too good .... You are best than my college teachers 💓💗
@speklex779 Жыл бұрын
Dope video
@eugenezuev73497 ай бұрын
splendid
@michaelanteneh28623 жыл бұрын
dude+just+wooow
@rede_neural2 жыл бұрын
6:26 Why did they put a set method inside a get method?
@nourialsayed3 жыл бұрын
RESPECT TO WHAT YOU DO BIG THANK YOU FOR YOU
@unalysuf Жыл бұрын
Thank you so much really for your effort
@JLSXMK82 жыл бұрын
That "Twitch Purple" is actually 0x7B3296 in Hexadecimal, if anybody was curious as to the hex equivalent.
@BroCodez2 жыл бұрын
nice!
@JLSXMK82 жыл бұрын
@@BroCodez I wonder if you can do this same type of tutorial series for C# / .NET; Now, I won't be able to utilize .NET6 (i.e., the latest available standard of the .NET framework) for quite some time, but as far as .NET 5 goes, that will be totally applicable.
@anaralizada88842 жыл бұрын
You are amazing
@harryrardy3 жыл бұрын
awesome content actually, and it helped me a lot cause i wasn't finding any place to study it easily ty bro
@魏子強-z7s Жыл бұрын
thank you bro my hero
@dervisaliduman6673 жыл бұрын
Thank you, that was amazing lesson :D
@danny.30363 жыл бұрын
Thanks, Bro! ☕ You're awesome!
@ОлександрРадовець-ы6т3 жыл бұрын
so very good
@NikhilYadav-yh9mq2 жыл бұрын
2 keywords are not working in another class setdefaultcloseoperation and getcontentpane... what to do 10:51
@nethmal12044 жыл бұрын
Thank you very much brother!This is really helpfull!Keep it up ur good work!Solve my a lot of questions!
@shaynazoedeguzman74182 жыл бұрын
Amazing! Thank you very much sir!
@sharnav96262 жыл бұрын
this has helped me a great deal
@roger-tj7oc3 жыл бұрын
Best account on youtube
@prizepig2 жыл бұрын
This series is great!
@phanikiran98262 жыл бұрын
no way, it can't be this easy.. no way
@bbabak44393 жыл бұрын
I have a problem, my eclipse doesn't suggest component class methods (that is usable to other objects) like .setSize(), .setVisible(), and much more. How do i fix this? i really don't want to use intelliJ :(
@HelicopterRidesForCommunists9 ай бұрын
Isn’t it awesome that we can simply ask AI our questions now and get immediate tailored personalized answers? I still find it miraculous. To answer yours: I cant say with 100% certainty, but it might be something that needs enabled in settings/preferences… although hopefully by 2 years youve long since found the solution lol
@HelicopterRidesForCommunists9 ай бұрын
Becareful what you choose to highlight when you apply that change to your targeted word. Make sure you dont have any place where it should stay the same highlighted. Good tip tho!
@malikshahzaib33134 жыл бұрын
Thanks bro code!!! Keep it up. I'm actually going to look forward to you.☺🍫
@geovex8333 Жыл бұрын
This is really epic! hahah
@jjbigelow4522 Жыл бұрын
I dont think so
@geovex8333 Жыл бұрын
@@jjbigelow4522 you obviously are a little beta programmer who sits in his moms basement all day punching away at the keys. BRO CODE IS EPIC >:(
@millejadecabrera45443 жыл бұрын
Thankssss for this one
@ottttoooo3 жыл бұрын
this feels like HTML/CSS coding
@ravensco7086 Жыл бұрын
Thank you bro!
@sliky73172 жыл бұрын
I'm assuming you can't do this with an online java compiler
@TEGUIAKAMEGNEDimitriAbel Жыл бұрын
Cool
@Kevin-xs1ft Жыл бұрын
high quality
@zahramsvi94782 жыл бұрын
Great!
@seabass61064 жыл бұрын
Love you Bro, Cheers Bro
@abdialemu8391 Жыл бұрын
bravo
@PJ-od9ev3 жыл бұрын
i have a question bro how do you know which method to use for example setIconImage(). how to know where and which method i should use??
@nonnodacciaio7042 жыл бұрын
Google it
@kingkock12 жыл бұрын
Bro, amazing x
@christophercanada86422 жыл бұрын
Thank You
@minhtetpaing16953 жыл бұрын
Thank you so much sir.
@daltonsilverman19744 жыл бұрын
Hey, I'm just learning coding but I saw your reply to someone else. Is learning Swing a waste of time now that it's becoming outdated? Should I focus my time on learning JavaFX instead? Java is my first language.
@mrmarzan66688 ай бұрын
Thanks G!
@kazuki32_z7510 күн бұрын
Hey Bro, i have some personal questions and if you don't mind... i would love to ask and learn something on my pace. thank you in advance
@ahlesunnat124 жыл бұрын
Can you help me with GridBagLayout?
@ibrahimylmaz83782 жыл бұрын
thanks bro
@Elias___11 ай бұрын
I will never call G.U. I. As GOO WEE
@_jantheman2 жыл бұрын
*_cool_*
@trungdao22863 жыл бұрын
great
@mullim98602 жыл бұрын
Hello Bro, I hope you are doing well
@bananogamer69724 ай бұрын
I have a problem here, when i put a specific height and width for some reason the window opened is smaller
@josueortiz88982 жыл бұрын
Thanks!
@nilsnickname44552 жыл бұрын
Does anyone know why there is no logo when I copy the exact code above and also put a 16x16 png file named logo.png in the src-folder??☹
Hey bro i am 15 yrs old and i have learned.. c, c#, html, css, java script. ..and i have watched most of your java videos.. but I am not quiet comfortable with java.. i dont feel that i have understand and ready to build app in java.. but i have created.. 3 games with c# and unity.. do you have some solutions?
@BroCodez4 жыл бұрын
My opinion is that, Java FX is better for developing applications than Swing, that would be a good next step for you
@YTSHANKY4 жыл бұрын
@@BroCodez thanks for your suggestion
@nethminaashen62012 ай бұрын
Are you doing well 👀❤
@nethminaashen62012 ай бұрын
@@YTSHANKYare you doing well ❤
@YTSHANKY2 ай бұрын
@@nethminaashen6201 yup doing good, currently doing bachelor's in computer science
@PoorwayTraning Жыл бұрын
thanks
@amalbenmoussa47607 ай бұрын
thks
@rishav-parasar Жыл бұрын
the icon is not working in intellij idea , please suggest something
@prajwaldeepkhokhar74163 жыл бұрын
hey bro, at the very end when we created the instance of myframe in main, if we wish to change or add some extra jframe property to the frame, can we do that from main itself or we have to go back to myframe class?