Java GUI 🖼️

  Рет қаралды 124,601

Bro Code

Bro Code

Күн бұрын

Java GUI frame JFrame swing tutorial for beginners
#Java #GUI #frame #JFrame #swing #tutorial #beginners
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
}
}

Пікірлер: 171
@phuongdonguyen6327
@phuongdonguyen6327 Жыл бұрын
Best java tutorial playlist on KZbin, I want to thank for what you've done, keep up good work!
@BroCodez
@BroCodez 4 жыл бұрын
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 } }
@ebrimadrammeh
@ebrimadrammeh Ай бұрын
Well understand, thank you so much
@tngflash2814
@tngflash2814 3 жыл бұрын
"Let's set the size by 420 to 420 because that's a funny number." LMAO. This had me laffin.
@KaviBalan007
@KaviBalan007 17 күн бұрын
I am really glad that I find your youtube channel. You are saviour man
@kemann3815
@kemann3815 2 жыл бұрын
Man, i wish everyone whos lookin to learn lava finds this channel! Its just absolutely the best!
@sudharshan_reddy_kakarla
@sudharshan_reddy_kakarla 2 жыл бұрын
It's Java . 😂.lava
@kemann3815
@kemann3815 2 жыл бұрын
@@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
@pavelkvasnicka6856
@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
@bitks7375
@bitks7375 3 жыл бұрын
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 :)
@pro-ck1qg
@pro-ck1qg 2 күн бұрын
the best tutorial
@rock6766
@rock6766 2 жыл бұрын
very fun very interactive lessons as well as structural knowledge, love it man 👍
@shankar7435
@shankar7435 Жыл бұрын
Never got this idea of using subclass of JFrame instead of repeating the same code several times in different projects. Thanks Bro.
@paniccookie_
@paniccookie_ 2 жыл бұрын
You are carrying my friend and I in our java comp sci class, THANK YOU!!!
@Sleepmedicine-kz9cw
@Sleepmedicine-kz9cw 9 ай бұрын
You are great, these videos are precious. Thank you bro.
@k4nyeeasto199
@k4nyeeasto199 3 жыл бұрын
Honestly thank you so much, my java skill got improved by watching you
@sankartechpro
@sankartechpro 4 жыл бұрын
❤️Superb, good explanation, keep it up. 👏👍👌
@BekirSARIKAYA
@BekirSARIKAYA 11 ай бұрын
Thank you Bro for sharing this video.
@cnarkaya629
@cnarkaya629 25 күн бұрын
why are you such a chad? Thanks bro!
@gemmarosemolina2082
@gemmarosemolina2082 Жыл бұрын
I really like the way your patience of explaining.
@smrtfasizmu6161
@smrtfasizmu6161 2 жыл бұрын
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.
@renecabuhan1675
@renecabuhan1675 3 жыл бұрын
Bro I recommended ur videos to my classmates they like it.
@BroCodez
@BroCodez 3 жыл бұрын
Thank you rene!
@D_Ghandi
@D_Ghandi Ай бұрын
Helping you, to keep helping me ⛈
@adaofsantos
@adaofsantos Жыл бұрын
Nice job, man! I like your tutorials too much. Congratulations for the beautiful job!
@NatyTor
@NatyTor 2 жыл бұрын
man im so like your video!! thanksss
@TEGUIAKAMEGNEDimitriAbel
@TEGUIAKAMEGNEDimitriAbel 10 ай бұрын
Cool
@jerryagsunod7053
@jerryagsunod7053 Жыл бұрын
best ever tutorial i've ever watch, thank you Bro Code
@abdialemu8391
@abdialemu8391 Жыл бұрын
bravo
@ahmedhajhamed5478
@ahmedhajhamed5478 Жыл бұрын
great
@michaelanteneh2862
@michaelanteneh2862 2 жыл бұрын
dude+just+wooow
@simon-elrondir8621
@simon-elrondir8621 11 ай бұрын
Thank you for teaching this to us. The time you put into these videos really shows :)
@bharathpavurala7817
@bharathpavurala7817 2 жыл бұрын
We will support you.... Keep rocking broooo😎
@robertmanigault625
@robertmanigault625 2 жыл бұрын
Another excellent video, Bro. Thanks. BTW, proud subscriber here.
@eugenezuev7349
@eugenezuev7349 4 ай бұрын
splendid
@jasonjacobs9174
@jasonjacobs9174 2 жыл бұрын
I am loving this channel.
@rohitbharatbhandwalkar8583
@rohitbharatbhandwalkar8583 Жыл бұрын
I thought starting GUI would be boring but guess what, I like this!!!
@nethmal1204
@nethmal1204 4 жыл бұрын
Thank you very much brother!This is really helpfull!Keep it up ur good work!Solve my a lot of questions!
@toemilio
@toemilio 12 күн бұрын
helped me with my cs30 class legend
@mahadevbansode4113
@mahadevbansode4113 3 жыл бұрын
Bro you are too good .... You are best than my college teachers 💓💗
@harryrardy
@harryrardy 3 жыл бұрын
awesome content actually, and it helped me a lot cause i wasn't finding any place to study it easily ty bro
@Simis999
@Simis999 2 жыл бұрын
Bro is our shining star in the middle of the night
@justinbanza4751
@justinbanza4751 3 жыл бұрын
Thank you for this video
@Ahmed_Emad_
@Ahmed_Emad_ 10 ай бұрын
Thank You for ease the information.
@BISAMARKSMANDOANG
@BISAMARKSMANDOANG Жыл бұрын
GG
@nourialsayed
@nourialsayed 3 жыл бұрын
RESPECT TO WHAT YOU DO BIG THANK YOU FOR YOU
@speklex779
@speklex779 Жыл бұрын
Dope video
@HelicopterRidesForCommunists
@HelicopterRidesForCommunists 5 ай бұрын
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!
@ОлександрРадовець-ы6т
@ОлександрРадовець-ы6т 3 жыл бұрын
so very good
@amalbenmoussa4760
@amalbenmoussa4760 3 ай бұрын
thks
@touriaamachrak1279
@touriaamachrak1279 Жыл бұрын
THANKS
@manuelgonzalezpalafox2627
@manuelgonzalezpalafox2627 2 жыл бұрын
Ly Bro 1
@mahdib9361
@mahdib9361 3 жыл бұрын
Please Make Tuturial For JAVAFX
@dervisaliduman667
@dervisaliduman667 3 жыл бұрын
Thank you, that was amazing lesson :D
@ian6609
@ian6609 2 жыл бұрын
🙉🙉 i really like the brocode did it
@geovex8333
@geovex8333 Жыл бұрын
This is really epic! hahah
@jjbigelow4522
@jjbigelow4522 Жыл бұрын
I dont think so
@geovex8333
@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 >:(
@MrLoser-ks2xn
@MrLoser-ks2xn 2 жыл бұрын
Thanks
@Kevin-xs1ft
@Kevin-xs1ft Жыл бұрын
high quality
@enciuraluca3100
@enciuraluca3100 3 жыл бұрын
Thank you sooooo much for all the videos
@dryrun4501
@dryrun4501 3 жыл бұрын
Hey you yeah I'm talking to you ! You r the best 🙏❣️
@zari_723
@zari_723 2 жыл бұрын
Thanks for another great vid
@JLSXMK8
@JLSXMK8 2 жыл бұрын
That "Twitch Purple" is actually 0x7B3296 in Hexadecimal, if anybody was curious as to the hex equivalent.
@BroCodez
@BroCodez 2 жыл бұрын
nice!
@JLSXMK8
@JLSXMK8 2 жыл бұрын
@@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.
@PoorwayTraning
@PoorwayTraning Жыл бұрын
thanks
@seabass6106
@seabass6106 3 жыл бұрын
Love you Bro, Cheers Bro
@roger-tj7oc
@roger-tj7oc 3 жыл бұрын
Best account on youtube
@prizepig
@prizepig 2 жыл бұрын
This series is great!
@phanikiran9826
@phanikiran9826 Жыл бұрын
no way, it can't be this easy.. no way
@malikshahzaib3313
@malikshahzaib3313 3 жыл бұрын
Thanks bro code!!! Keep it up. I'm actually going to look forward to you.☺🍫
@anaralizada8884
@anaralizada8884 2 жыл бұрын
You are amazing
@mrmarzan6668
@mrmarzan6668 4 ай бұрын
Thanks G!
@sairos4057
@sairos4057 Жыл бұрын
thanks bro
@_jantheman
@_jantheman 2 жыл бұрын
*_cool_*
@zahramsvi9478
@zahramsvi9478 Жыл бұрын
Great!
@danny.3036
@danny.3036 3 жыл бұрын
Thanks, Bro! ☕ You're awesome!
@shaynazoedeguzman7418
@shaynazoedeguzman7418 2 жыл бұрын
Amazing! Thank you very much sir!
@unalysuf
@unalysuf Жыл бұрын
Thank you so much really for your effort
@ravensco7086
@ravensco7086 9 ай бұрын
Thank you bro!
@kaushalprasadyadav9242
@kaushalprasadyadav9242 2 жыл бұрын
you are great. please make videos for mobile app
@cdjosh3568
@cdjosh3568 4 жыл бұрын
Epic video!
@sharnav9626
@sharnav9626 2 жыл бұрын
this has helped me a great deal
@魏子強-z7s
@魏子強-z7s Жыл бұрын
thank you bro my hero
@nilsnickname4455
@nilsnickname4455 Жыл бұрын
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??☹
@ottttoooo
@ottttoooo 3 жыл бұрын
this feels like HTML/CSS coding
@kingkock1
@kingkock1 2 жыл бұрын
Bro, amazing x
@bbabak4439
@bbabak4439 2 жыл бұрын
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 :(
@HelicopterRidesForCommunists
@HelicopterRidesForCommunists 5 ай бұрын
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
@Google_Engineer
@Google_Engineer 3 жыл бұрын
😘😘😘😘
@millejadecabrera4544
@millejadecabrera4544 3 жыл бұрын
Thankssss for this one
@Elias___
@Elias___ 8 ай бұрын
I will never call G.U. I. As GOO WEE
@sliky7317
@sliky7317 2 жыл бұрын
I'm assuming you can't do this with an online java compiler
@christophercanada8642
@christophercanada8642 Жыл бұрын
Thank You
@josueortiz8898
@josueortiz8898 Жыл бұрын
Thanks!
@minhtetpaing1695
@minhtetpaing1695 3 жыл бұрын
Thank you so much sir.
@erickelizalde2
@erickelizalde2 2 жыл бұрын
thank you
@PJ-od9ev
@PJ-od9ev 3 жыл бұрын
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??
@nonnodacciaio704
@nonnodacciaio704 2 жыл бұрын
Google it
@tmro5356
@tmro5356 2 жыл бұрын
Thanks Bro!
@grozageorge2887
@grozageorge2887 Жыл бұрын
😀
@majid1885
@majid1885 2 жыл бұрын
Thanks man
@daltonsilverman1974
@daltonsilverman1974 3 жыл бұрын
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.
@bananogamer6972
@bananogamer6972 24 күн бұрын
I have a problem here, when i put a specific height and width for some reason the window opened is smaller
@borislove4700
@borislove4700 3 жыл бұрын
thanks! this.setLocationRelativeTo(null); //center frame
@snakekq
@snakekq 2 жыл бұрын
thx
@Sandra-rz5us
@Sandra-rz5us 8 ай бұрын
My image is not showing yet i followed your steps
@mlgcactus1035
@mlgcactus1035 3 ай бұрын
same
@rayhanahmed3702
@rayhanahmed3702 3 ай бұрын
Did you import the packages?
@rede_neural
@rede_neural 2 жыл бұрын
6:26 Why did they put a set method inside a get method?
@ahlesunnat12
@ahlesunnat12 4 жыл бұрын
Can you help me with GridBagLayout?
Java labels 👨‍💻
18:00
Bro Code
Рет қаралды 96 М.
Java calculator app 🖩
34:36
Bro Code
Рет қаралды 428 М.
Остановили аттракцион из-за дочки!
00:42
Victoria Portfolio
Рет қаралды 2,8 МЛН
Will A Guitar Boat Hold My Weight?
00:20
MrBeast
Рет қаралды 190 МЛН
У ГОРДЕЯ ПОЖАР в ОФИСЕ!
01:01
Дима Гордей
Рет қаралды 8 МЛН
小丑在游泳池做什么#short #angel #clown
00:13
Super Beauty team
Рет қаралды 37 МЛН
Using docker in unusual ways
12:58
Dreams of Code
Рет қаралды 446 М.
Java generics ❓
22:04
Bro Code
Рет қаралды 108 М.
Git Tutorial For Dummies
19:25
Nick White
Рет қаралды 1,1 МЛН
This is Why Programming Is Hard For you
10:48
The Coding Sloth
Рет қаралды 855 М.
Use these instead of vh
6:06
Kevin Powell
Рет қаралды 507 М.
Java GUI Tutorial - Make a GUI in 13 Minutes #99
12:58
Alex Lee
Рет қаралды 1,2 МЛН
Java snake game 🐍
43:30
Bro Code
Рет қаралды 1,5 МЛН
you will never ask about pointers again after watching this video
8:03
Low Level Learning
Рет қаралды 2,2 МЛН
Java buttons 🛎️
14:28
Bro Code
Рет қаралды 167 М.
Learn To Code Like a GENIUS and Not Waste Time
9:41
The Coding Sloth
Рет қаралды 1,5 МЛН
Остановили аттракцион из-за дочки!
00:42
Victoria Portfolio
Рет қаралды 2,8 МЛН