Java calculator app 🖩

  Рет қаралды 415,466

Bro Code

Bro Code

Күн бұрын

Java simple calculator program w/ GUI
#Java #calculator #app
(NOT A COMPLETE CALCULATOR)

Пікірлер: 475
@BroCodez
@BroCodez 4 жыл бұрын
import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Calculator implements ActionListener{ JFrame frame; JTextField textfield; JButton[] numberButtons = new JButton[10]; JButton[] functionButtons = new JButton[9]; JButton addButton,subButton,mulButton,divButton; JButton decButton, equButton, delButton, clrButton, negButton; JPanel panel; Font myFont = new Font("Ink Free",Font.BOLD,30); double num1=0,num2=0,result=0; char operator; Calculator(){ frame = new JFrame("Calculator"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(420, 550); frame.setLayout(null); textfield = new JTextField(); textfield.setBounds(50, 25, 300, 50); textfield.setFont(myFont); textfield.setEditable(false); addButton = new JButton("+"); subButton = new JButton("-"); mulButton = new JButton("*"); divButton = new JButton("/"); decButton = new JButton("."); equButton = new JButton("="); delButton = new JButton("Del"); clrButton = new JButton("Clr"); negButton = new JButton("(-)"); functionButtons[0] = addButton; functionButtons[1] = subButton; functionButtons[2] = mulButton; functionButtons[3] = divButton; functionButtons[4] = decButton; functionButtons[5] = equButton; functionButtons[6] = delButton; functionButtons[7] = clrButton; functionButtons[8] = negButton; for(int i =0;i
@vickysanth9653
@vickysanth9653 3 жыл бұрын
it would be more easy to understad for beginners like me if you go slower than usual.. because i don't understand many terms like "ActionListener", interfaces etc.. it's like new to me since I'm a beginner..
@sidra3210
@sidra3210 3 жыл бұрын
Nice👍🔥
@shokirovblog
@shokirovblog 3 жыл бұрын
@@komaltandle465 LOL
@agent47hitman75
@agent47hitman75 3 жыл бұрын
@NOA777 the method Double.parseDouble() casts a value to a double type value. the getText() method is used to get the text from the text field. So Double.parseDouble(txtfield.getText()) is actually casting the string values to a double type value of whatever is written in the rext field as we can't perform calculation with string type of values.
@medjl6083
@medjl6083 3 жыл бұрын
@NOA777 The method parseDouble() of wrapper class Double, convert string to double.
@deepeshsingh7717
@deepeshsingh7717 4 жыл бұрын
People are missing out on your amazing content. I am still learning Java, and your content helps a lot.
@Bryysanity
@Bryysanity 7 ай бұрын
how are you now on your Java journey?
@kylewc2286
@kylewc2286 5 ай бұрын
​@@Bryysanity Im curious too
@StefaanMeeuws
@StefaanMeeuws 2 жыл бұрын
Most impressive. Very lucid coding. Congrats on teaching me a little more than I knew!
@ashkaneghbali2702
@ashkaneghbali2702 2 жыл бұрын
Came here straight after the 12 hour java tutorial. You are Awesome Bro. Keep 'em coming :)
@EbbieMonch
@EbbieMonch 2 жыл бұрын
This tutorial was very good and even gave the challenge of fixing the Delete and Clear font size while keeping the rest of the numbers and functions font the same size
@milesmiller9588
@milesmiller9588 3 жыл бұрын
Started practice with GUI's and this helped a lot!
@AnsarAbbas-ed5ig
@AnsarAbbas-ed5ig 2 жыл бұрын
off course same here bro😎
@rasisulhubbi9316
@rasisulhubbi9316 Жыл бұрын
I just start learning java a month ago and a little bit confuse what to do, and i found your channel, its really help me to practice
@zul_afluz
@zul_afluz Жыл бұрын
Extremely helpful. Got my mini project done within 30 minutes referring your source code and guide. Thankkksss a lotttt ☺👏
@ChinmayaHelchel
@ChinmayaHelchel 2 жыл бұрын
Thank you @BroCode ☺ It was really up to the point !
@Sorjen108
@Sorjen108 2 жыл бұрын
This channel is so underrated I went through many tuto on youtube, but none of them was that good(sincerely), and this is in regards to any programming language This developer is Gold
@bellabrink8610
@bellabrink8610 2 жыл бұрын
Amazing content as always man, thank you!
@karllouiserito4777
@karllouiserito4777 3 жыл бұрын
Thanks Bro I've learned something new today about Java especially that GUI.
@mansinaidu
@mansinaidu Жыл бұрын
bro this was really awesome .... my sir told it but it was too confusing but your program was clean and neat.... thank you so much .
@alessandroformica6824
@alessandroformica6824 3 жыл бұрын
Thank you, Bro! My prayers to the algorithm.
@parkashkumar765
@parkashkumar765 2 жыл бұрын
You always perfect sir because your way of teaching is all the time perfect. Thank you so much sir.🥰
@manthanpatki146
@manthanpatki146 3 жыл бұрын
well I am just commenting to support you because this video has been really helpful and i learnt more ways to use GUI in java.
@365motivation.9
@365motivation.9 Жыл бұрын
Bro code,this is an amazing tutorial.Thank you Mann,you taught me alot here.
@gyangaha109
@gyangaha109 3 жыл бұрын
yo bro, love it thanks keep up the good work
@mohammedhh6488
@mohammedhh6488 2 жыл бұрын
Thank you very much for your assistance, you explained the code perfectly. Thumb Up.
@suaddacic7728
@suaddacic7728 3 жыл бұрын
Thanks man You explain java better than my teacher
@westonpeabody8010
@westonpeabody8010 2 жыл бұрын
Thanks man. Believe it or not Ive been learning Java for years and until now Ive never actually wrote a fully functional calculator.
@kemann3815
@kemann3815 2 жыл бұрын
Amazing video. That robotic laugh at the end got me 😂
@kumarkelash4423
@kumarkelash4423 3 жыл бұрын
you are really a great teacher you have made my life easy hahahah... God bless you sir
@alirezahassanieghtedar5010
@alirezahassanieghtedar5010 2 жыл бұрын
Thanks a million , It was really nice and perfect for a beginner like me
@slonbeskonechen8310
@slonbeskonechen8310 3 жыл бұрын
Please, don't stop!!! More and more tutorials!!!!
@Zito_from_OHIO
@Zito_from_OHIO 2 ай бұрын
the first sentence (Please, don't stop!!) remember me of a chat i had i chai 😏😏
@BigBadBicycle
@BigBadBicycle Жыл бұрын
I just begun with Java and made my own calculator like this. But after finishing and seeing this video, there is a lot of things I could do to definetly reduce my code size.
@BlueOrcas
@BlueOrcas Жыл бұрын
I knew bro couldn't miss the negative sign before. He just cares for us bros and was testing us to grow stronger💪
@orlandohunter2785
@orlandohunter2785 3 жыл бұрын
Bro! These videos are awesome 👏
@flyetimadtravel2157
@flyetimadtravel2157 3 жыл бұрын
Bro You are legend. I am not a student I started learning JAVA to make my travel agency CRM.
@alvydagr8108
@alvydagr8108 Жыл бұрын
Wow even though your style is different, its super easy to understand and frankly, might make me do my calculator over just because It seems easier the way you did it
@wolanus
@wolanus 3 жыл бұрын
Another great video. Thanks!
@grenadine9448
@grenadine9448 3 жыл бұрын
Awesome content !
@glebignites5278
@glebignites5278 3 жыл бұрын
Thank you very much! It was very helpful.
@athenkosinyombolo4275
@athenkosinyombolo4275 3 жыл бұрын
This was really helpful
@ManuelErica
@ManuelErica 23 күн бұрын
You're the man. Good job!
@ShahzadKhan-jg3hl
@ShahzadKhan-jg3hl 2 жыл бұрын
Well defined. Thank you.
@ahmedshifa
@ahmedshifa Жыл бұрын
Amazing content, thank you!
@YaroMalik
@YaroMalik 5 ай бұрын
Bro the goat. Just finished learning Java with you and am building my first project with you too
@ThunderHockeyTFL
@ThunderHockeyTFL 2 жыл бұрын
big thanks, very helpful video! subbed
@secretchannel2151
@secretchannel2151 3 жыл бұрын
You are a true Bro. Thank you very much sir! Everyone keep commenting, liking and subbing to help the algorithm!
@Respects103
@Respects103 5 ай бұрын
best yt for coding i learned many things from you thanks you so much bro code
@mohdaman5928
@mohdaman5928 2 жыл бұрын
i truly learn a lot man thanks
@B_lla008
@B_lla008 Жыл бұрын
thanks for clean work it really help me !you are super good :)
@omersond4891
@omersond4891 3 жыл бұрын
very helpful video. i understand for loops, if() more than before
@meguminsatou1591
@meguminsatou1591 10 ай бұрын
man Thank you i really need this tutorial for my computer programming 2
@FukSN
@FukSN 3 жыл бұрын
Thanks Bro !! These tutorials are nice and quick to run through and show beginners like me how certain code works in a real app. I find this more valuable than just a lesson on certain things like arrays. I have noticed a slow down on the java vids, any chance of any new quick app tutorial vids?
@biplobahmed6509
@biplobahmed6509 Жыл бұрын
no caption king. learned a lot from you . thnaks for the quality content
@gabrielvalentin3106
@gabrielvalentin3106 2 жыл бұрын
Excellent as always bro!
@thebeginner613
@thebeginner613 2 жыл бұрын
Polich machaa.. You are great 👏🏻👏🏻
@fmsabisai
@fmsabisai Жыл бұрын
This is an amazing tutorial, thumbs up. I would have loved to see how you handled division by 0. I have also noticed that its possible to have multiple dots in a number which would result in an error during calculations.
@yasarcarel
@yasarcarel 4 ай бұрын
if(e.getSource() == decButton) { if(textfield.getText().contains(".")) { String temp = textfield.getText(); textfield.setText(""); for(int i=0;i
@incarnateblizzard4874
@incarnateblizzard4874 22 күн бұрын
little bit late, but came across the tutorial right now. for multiple dots I did (most likely theres a better solution): if(e.getSource() == decButton) { boolean alrDec = false; for(int i = 0; i
@konsti02
@konsti02 3 жыл бұрын
this is great! Thank you
@mahaalibrahim7934
@mahaalibrahim7934 3 жыл бұрын
That’s was a lot of code thanks for your effort
@user-mk8mj2pe2j
@user-mk8mj2pe2j 7 ай бұрын
Very cool! Helped me alot!
@helpdesk9535
@helpdesk9535 3 жыл бұрын
Thanks for the help Big Bro!
@ThePraQNome
@ThePraQNome Жыл бұрын
Great tutorial, thank you.
@brianpelarez
@brianpelarez Жыл бұрын
Good day BRO! Thanks so much I can now code my simple calculator, through your tutorial.
@Baltazar_Gunar
@Baltazar_Gunar 2 жыл бұрын
i just finish second book about java. A Beginners Guide and Complete Reference from Herbert SCHİLDT. I was looking for an example of real GUI software that wasn't beyond my knowledge and actually did something. So I could get an idea of ​​the general programming structure. Your video help me a lot about this. Thank you.
@Sapocrate
@Sapocrate 2 жыл бұрын
Thanks! (I appreciate also the 420 on the preview)
@Dejuk22
@Dejuk22 Жыл бұрын
well done bro🙌 thank you!!
@reo4465
@reo4465 2 жыл бұрын
Thank you so much for making this wonderful vidoes ❤️
@etude5942
@etude5942 20 күн бұрын
Thank you so much for the perfect explanation ❤❤❤❤😭
@shibildas
@shibildas Жыл бұрын
Bro, that was awesome ❤️
@Ahmad-jc7by
@Ahmad-jc7by Жыл бұрын
so enjoyable, thanks for this Man
@djziomsuper
@djziomsuper 3 жыл бұрын
Great video!
@kampfer6375
@kampfer6375 2 жыл бұрын
Very well explained 👍
@user-qe5pk6ke3k
@user-qe5pk6ke3k 3 жыл бұрын
awesome broo..keep rocking
@letsgame108
@letsgame108 Жыл бұрын
Thank you so much bro. this is really amazing
@LiyaAi-fm9ec
@LiyaAi-fm9ec 7 сағат бұрын
Very beautiful, Love it!
@quikmath8071
@quikmath8071 2 жыл бұрын
Awesome tutorial
@noah77
@noah77 4 жыл бұрын
Cool, this is nice. Awesome video. And also, I have finished creating my AI ChatBot!!
@BroCodez
@BroCodez 4 жыл бұрын
nice! Which app is it for?
@JEE-nf1cv
@JEE-nf1cv 6 ай бұрын
This was indeed Helpful brother Thanks for the tutorial
@animegaming7116
@animegaming7116 6 ай бұрын
the package come back as error what to do
@manasapanda9248
@manasapanda9248 2 жыл бұрын
Amazing video I really enjoy this as this is very useful in my program
@user-ot2sn1cn3e
@user-ot2sn1cn3e Жыл бұрын
great example. Thanks
@Daniel78852
@Daniel78852 2 жыл бұрын
Thanks man that helped a lot. Nw I see how Java works.
@muhammadbsoul1459
@muhammadbsoul1459 Жыл бұрын
Thanks pro Very helpful video Keep going
@coolboy.bladersshow9159
@coolboy.bladersshow9159 3 жыл бұрын
Thanks bro. You helped me a lot.
@divyakale1271
@divyakale1271 9 ай бұрын
Thanks Wonderful video ! This video is easy to understand and very helpful.
@ryandavis710
@ryandavis710 3 жыл бұрын
Great tutorial
@rudranagariya8546
@rudranagariya8546 3 жыл бұрын
Thank you so much bro you are the only best coder
@ashnasanam217
@ashnasanam217 2 жыл бұрын
Underrated!
@ritikrajput2894
@ritikrajput2894 Жыл бұрын
Wonderful Tutorial
@raviratnakar3803
@raviratnakar3803 3 жыл бұрын
You make it look very easy. Thanks Bro!
@cutie3127
@cutie3127 10 ай бұрын
Your amazing Content makes me to passionate about java more... I thought to left but ...
@MatheusOliveira-me3rf
@MatheusOliveira-me3rf Жыл бұрын
thank you man!!
@stanislavdimitrov1643
@stanislavdimitrov1643 11 ай бұрын
Great, fantastic. It may seem a little but too advanced at the beginning, but you can try it and see:)
@infotechlab
@infotechlab Жыл бұрын
hey bro! thanks a lot for this amazing content..
@wolfhans2122
@wolfhans2122 Жыл бұрын
thank you for your work.
@Mia_sarahia_kit_official
@Mia_sarahia_kit_official Жыл бұрын
thank you so much bro code it help me a lot when i watch your vedio. love yah
@ryanning4516
@ryanning4516 3 жыл бұрын
awwwwwwwwwwwsome video bro!!! I subscribed to your channel!!! and I learned a lot! and can you make a pokemon type of tutorial?
@BroCodez
@BroCodez 3 жыл бұрын
haha my latest video on FileReaders is pokemon themed actually lol
@Gaminiheraliyawala
@Gaminiheraliyawala 10 ай бұрын
Dear Bro you are simply amazing... ❤❤💐💐being sooo... generous in sharing your wealth of knowledge and you certainly deserve a very big appreciation for making me impressed to learn Java programming. God Bless You Bro...🙏🙏. I really loved it and impatient to try it ASAP..... 👌👌👍👍
@rsdigiomoney
@rsdigiomoney Жыл бұрын
I followed through this whole tutorial on Linux with text editor and terminal Javac compiling (no IDE!) and it worked flawlessly even when packaged into a jar file. I feel like I learned stuff but even if I didn’t, I at least understand how the program works and it was fun to feel like I’m coding stuff just by following along
@omeraran9398
@omeraran9398 3 жыл бұрын
I love your channel.
@irizjuh1321
@irizjuh1321 Жыл бұрын
Wonderful video! This series has been really helpful in training my way of thinking too! Sometimes I pause the video and finish the line or piece of code before starting the video again so I can check it. Thank you so much for the effort! For the delete-button Action-listener, I wrote these alternative lines btw. if(e.getSource()==delButton) { textField.setText(textField.getText().substring(0,(textField.getText().length() - 1))); } It takes the text in the textfield and replaces it with a substring that leaves out the last index. This way you don't need to create a for-loop and you can do it with one line instead! I really learned this way of thinking through practicing with your videos - so thanks a lot! :D
@hamadareda1695
@hamadareda1695 3 жыл бұрын
thank you this is relly amazing
@khusanbekgafurov
@khusanbekgafurov Жыл бұрын
Awesome job I like it Thanks
@Hypa_Playz
@Hypa_Playz Жыл бұрын
Nice content keep it up!!!🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
@iluvkent7777
@iluvkent7777 Жыл бұрын
thank u for this nice tutorial
@micev672
@micev672 Жыл бұрын
Thank you sir!
@retro9794
@retro9794 3 жыл бұрын
Thank you!
@nashiroyohei5925
@nashiroyohei5925 Жыл бұрын
Thank you. This is my first heavy coding project😂
Java login system 👨‍💻
30:36
Bro Code
Рет қаралды 304 М.
Build this JS calculator in 15 minutes! 🖩
15:20
Bro Code
Рет қаралды 454 М.
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 10 МЛН
Женская драка в Кызылорде
00:53
AIRAN
Рет қаралды 511 М.
Как бесплатно замутить iphone 15 pro max
00:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 8 МЛН
20 Programming Projects That Will Make You A God At Coding
14:27
The Coding Sloth
Рет қаралды 806 М.
Java HashMap 🗺️
13:05
Bro Code
Рет қаралды 79 М.
Running "Hello World!" in 10 FORBIDDEN Programming Languages
18:07
Java objects (OOP) ☕
10:46
Bro Code
Рет қаралды 162 М.
How do computers read code?
12:01
Frame of Essence
Рет қаралды 3,1 МЛН
Learn Stack data structures in 10 minutes 📚
10:07
Bro Code
Рет қаралды 197 М.
Java Calculator App Development Tutorial 2 |  Swing | GUI
9:12
UMK Games
Рет қаралды 243 М.
Learn Java in One Video - 15-minute Crash Course
14:54
Coding with John
Рет қаралды 677 М.
Java GUI Tutorial - Make a GUI in 13 Minutes #99
12:58
Alex Lee
Рет қаралды 1,2 МЛН
Xiaomi SU-7 Max 2024 - Самый быстрый мобильник
32:11
Клубный сервис
Рет қаралды 540 М.
Rate This Smartphone Cooler Set-up ⭐
0:10
Shakeuptech
Рет қаралды 6 МЛН
Looks very comfortable. #leddisplay #ledscreen #ledwall #eagerled
0:19
LED Screen Factory-EagerLED
Рет қаралды 10 МЛН