How to install windowbuilder in eclipse ide : help->install new software->select all available sites in work with->search WindowBuilder-> select general purpose tools -> in details mark first 2 boxes and unbox next 2 boxes->next->next->click accept->click finish->after installation click restart now. It will available in eclipse ide
Hello, good one. I have tried this and has worked out well, although I have a small some improvisation. you can initialise the operation variable after each if/if else clause. This shall avoid further operations to carry on after each press of "=" symbol.
For 4 operators if we take second variable inside their respective if statement and for % operation within else if if we write : result = first/100; answer = Double.toString(result); answer = String.format("%.2f", result); textField.setText(answer); then % in this code is working like it does in mobile calculators
Dude amazing thank you! Everything helped but, when I exported it and launched it on my desktop it said an JNI Error Occurred please check your installation and try again. Please help me!
Can you explain why str.toString() was able to convert string when str.deleteCharAt(textField.getText().length()-1) was not saved into memory? JButton btnBackspace = new JButton("\uF0E7"); btnBackspace.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String backspace = null; if (textField.getText().length() > 0) { StringBuilder str = new StringBuilder(textField.getText()); str.deleteCharAt(textField.getText().length()-1); backspace = str.toString();
hey thanks for the code but how do i fix it when i run it as a runnable jar file? it says "A java exception has occured." Please, i need it for class ty.
Not matter what I do my "=" operation always adds the first and second variables together? The -, * and / do not work as intended. I have doubled my code and even changed the "+" to a "-" on the first if statement and keep getting the same result.
@@Adam1llion In the result the floating no can only have two numbers after the point. E.g- the calculated result is 10.763948 but is shows only two digits rounded after the point 10.77
May be ur text field with different name so it does not get recognise Check your text field name by click on text field and after click you see properties of its on left side. If error is still come after checking this then tell me i give you my email id then send me pic of the error
answer=String.format("%.2f", result); got error in format word as it say to convert double result to object result after converting first+second word error say convert to double..............?????
If I want to calculate further with the output it doesn't work with the commas but it just add the number on the display after the comma. Could you help me ? My error code is: Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "2,00" at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054) at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) at java.base/java.lang.Double.parseDouble(Double.java:651) at Taschenrechner2$21.actionPerformed(Taschenrechner2.java:353) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389) at java.desktop/java.awt.Component.processEvent(Component.java:6391) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
How to install windowbuilder in eclipse ide :
help->install new software->select all available sites in work with->search WindowBuilder-> select general purpose tools -> in details mark first 2 boxes and unbox next 2 boxes->next->next->click accept->click finish->after installation click restart now. It will available in eclipse ide
Thanku bro successfully calci done by watching ur video ❤❤❤🎉
Hello, good one. I have tried this and has worked out well, although I have a small some improvisation.
you can initialise the operation variable after each if/if else clause. This shall avoid further operations to carry on after each press of "=" symbol.
Thanks for this suggestion it will definitely help a lot of people
Thank you so much 🌼 I just got A+ in this project 💛✨
Welcome 😀
Ooy hooy
Thank you for showing us your skills. Nice job. :)
Thank you so much brother it my second learning project it works
Thank you for this informative video. You explained these details so easily .
Thank you so much for your detail explanation sir.
Thanks a lot it helps me for creating my mini project...😊😊❤❤
It's easier than other youtubers who take a hour to make a calculator
Thanku so much sir...
Please make video using java eclipse and MYsql
Thanks a lot fabulous vedio❤️🔥 only bcoz of u I completed my first project in java 🎉
Thanks brother keep supporting
keep it up
excellent work 👍👍👍
Thnx banty khushwaha
Copied from DJ Oamen
Thanks a Lot Very Good Keep it up
Thank you so much for making a simple projects
great video!
helped me a lot
thank you so much!
Excelent video dude, regards from Uruguay !
thank you brother, ypu helped me a lot
Excellent work dude
Amazing Start
Thank its informative
Keep it up👍👍👍
Excellent work
Thanks
Thanku so much for this video 🤩
Hi... explanation is very well ...can u plz share the source code?
Great start Bhai ....
Thank you brother share the video plzz...☺️
Great work...Thanks bro...Keep rocking....Helped me a loot.
Thanks brother keep supporting
@@TechProjects sure....🤗
I dont know if I missed something, but when I click dot it doesnt work properly. Any solutions?
excellent work.. really 👏 but I think we haven't written code for C Button
I write it please check carefully btw thanks 😃
oh then my mistake.. really sorry
Thank you so much brother ❤❤
THANK YOU SM for this video!!! Helped a lot
Good
U r nathing u just 👍 great.
Nice👍🙂
Nice work👏
Thnx brother and share the video plzz☺️
Nice work keep it up brother 👍👍
Tq brother
when you finally understand the code it's look easier hahaha
Good luck.very clear lesson 👌😍
Thanks brother keep supporting
Good tutorial bro 💙😊
Thanks brother ❤️
Good work.
Thnx bro
Super
in my eclips there is no swing designer, nor window application folder, what should i do??
Thank you very good video
Thank you too
Very nice
Thanks please subscribe and keep supporting
Thank you so much pro
I have a query : % in normal calculators used to find percentage, but here we code " first % second " which will give the mod value, is that ok?
For 4 operators if we take second variable inside their respective if statement and for % operation within else if if we write :
result = first/100;
answer = Double.toString(result);
answer = String.format("%.2f", result);
textField.setText(answer);
then % in this code is working like it does in mobile calculators
yes it work as quotient reminder
Dude amazing thank you! Everything helped but, when I exported it and launched it on my desktop it said an JNI Error Occurred please check your installation and try again. Please help me!
omg thnks so much i hope you will be success one day
Thanks keep supporting
verify ke sath customize bhi kro baki sb ok hai👌
Verify krliya h
ok to customize bhi kro
thanks so much for your help
Welcome
Big fan
Yes
Very nicely taught but plz also tell that how to do any respective operation repeatedly like 2+3+5+6= ? Like this pattern...
Use infix to postfix
Will u please explain it a little... Plz 🙏
Actually I'm new to coding..
Use Google for this that one is big topic hope you understand
@@TechProjects Okay bro, Thank you for ur help till now🙏
Thank you so much for this video😍
My pleasure 😊
كان فيديو رائع جدا
Good bro 👍
Thanx bro
how did you change the variable name example button_1 to btn1?
Thank you.. How do you turn it into an exe file extension?
there is no option of application window in the wizard section
Bro please can u help me, i don't know why the palette is empty??
I tried your code it works perfect but the answer is editable what is the solution please tell
nice voice bro 😍😍
Thanx brother share the video plzz☺️☺️
Tq so much bro
Can you explain why str.toString() was able to convert string when str.deleteCharAt(textField.getText().length()-1) was not saved into memory?
JButton btnBackspace = new JButton("\uF0E7");
btnBackspace.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String backspace = null;
if (textField.getText().length() > 0) {
StringBuilder str = new StringBuilder(textField.getText());
str.deleteCharAt(textField.getText().length()-1);
backspace = str.toString();
textField.setText(backspace);
}
}
});
here you wrote the code to do arithmetic operations using only two numbers
how can i do that operations using multiple numbers
for eg : 2+2+6 =10
hey thanks for the code but how do i fix it when i run it as a runnable jar file? it says "A java exception has occured." Please, i need it for class ty.
Same won't work 😢
I did everything but it in the equal to area it shows that return needs to be an object instead of a double
All the program are very good for calculator, but percentage option is not clear in your demonstration... please clear it ...:-(
Thanks a lot !
Good tutorial 😍👍🏼
Thank you brother
Copied from DJ Oamen
❤️
Bruhhhhhhhh Thank you!!!!
Sir I don't have swing design option . please can you explain what i do?
Not matter what I do my "=" operation always adds the first and second variables together? The -, * and / do not work as intended. I have doubled my code and even changed the "+" to a "-" on the first if statement and keep getting the same result.
And what is this part "%.2f" I don't understand what it is?
Check the code please
@@Adam1llion In the result the floating no can only have two numbers after the point. E.g- the calculated result is 10.763948 but is shows only two digits rounded after the point 10.77
in my eclipse window builder properties are not see it is 3
white blank window and one black window for components why ?please help.
can we share the final project so that others can use it
i made my calculator at 27 april 2020. program does not recognise textField als a valid class,why did it not declare the variable automatically?
May be ur text field with different name so it does not get recognise
Check your text field name by click on text field and after click you see properties of its on left side.
If error is still come after checking this then tell me i give you my email id then send me pic of the error
I am getting format error while writing for Equal button can you help me out
Bhaiya Swing design agr option mai hi nhi h toh kya krna chahiye(kyuki yeah eclipse mai show nhi ho raha h ?
My design part is not coming where and how do I get the design ?
answer=String.format("%.2f", result);
got error in format word as it say to convert double result to object result
after converting first+second word error say convert to double..............?????
where is application window option is not available for me wt can I do now
can we add 3D effect here ?? if so then how
Can you plz help me my design is not coming it is showing error it says jawa.awt package is not accessible...can you plz help me
thanks
Why have you taken string at String number?
bro everything was fine but it does not work from the desktop icon.
In my eclipse it not showing application window what i need to do
nice bro!!
Thanks big bro share the video plzz☺️
i dont have the option of windows builder
bro i am not able to get the window builder option in the process .....can u plz help me out
Install swing deisgner first in your eclipse ide
why do i get an error after making the class calci, i downloaded all the add ons needed
Try to restart and perform every operation again
Maybe you Missed something
If I want to calculate further with the output it doesn't work with the commas but it just add the number on the display after the comma. Could you help me ?
My error code is:
Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "2,00"
at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.base/java.lang.Double.parseDouble(Double.java:651)
at Taschenrechner2$21.actionPerformed(Taschenrechner2.java:353)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
at java.desktop/java.awt.Component.processEvent(Component.java:6391)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Keylistner bhi lagao na veo
What is the meaning of \uF0E7? Like where did you find that out?
Code for backspace character you can easily find it on google
I sont see application windows in others after ive right my project
Bro i have same like u all buttons are activated but operations are not performing
You set on event listner on every button?
why mine on 8:02 have null word before the number 1? :((
i am not getting "windows builder" option. Any other way? kindly help me asap.
Watch my of how to install java
On that video i also show how to install window builder in eclipse ide
when i am ecxporting, its showing A JNI error has occurred, please check your installation and try again in Eclipse
I uploaded a video how to convert java project in exe so please check that
@@TechProjects Tried that, still same error
How to try catch for Mathematical error? Been trying to make a try catch for 0 divided by 0, but it only crash the program, not catch it.
Use if else when you press on equal it is better
@@TechProjects Holy shit dude!!!!! I can't believe it actually work!!! THANK YOU SO MUCH!!!!!!
Thanks brother keep supporting
Can I get the Source code for it ?