Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
EN
Uploaded by
Jainul Musani
38 views
Simple Calculator using JavaFx a part of Advance Java
Using JavaFx Create a Simple Calculator program
Technology
◦
Read more
0
Save
Share
Embed
Embed presentation
Download
Download to read offline
1
/ 2
2
/ 2
More Related Content
DOCX
Calculator code with scientific functions in java
by
Amna Nawazish
PDF
Set up a JavaFX GUI-based program that shows a 10 times 10 grid of la.pdf
by
xlynettalampleyxc
PPTX
Java final project of scientific calcultor
by
Md. Eunus Ali Rupom
PPTX
Scientific calcultor-Java
by
Shaibal Ahmed
TXT
New text document
by
mirzaaabdulmanan
PDF
Core Java Interface Concepts for BCA Studetns
by
Jainul Musani
PDF
Java Abstract and Final Class for BCA students
by
Jainul Musani
PDF
Java Collection Framework for BCA Students
by
Jainul Musani
Calculator code with scientific functions in java
by
Amna Nawazish
Set up a JavaFX GUI-based program that shows a 10 times 10 grid of la.pdf
by
xlynettalampleyxc
Java final project of scientific calcultor
by
Md. Eunus Ali Rupom
Scientific calcultor-Java
by
Shaibal Ahmed
New text document
by
mirzaaabdulmanan
Core Java Interface Concepts for BCA Studetns
by
Jainul Musani
Java Abstract and Final Class for BCA students
by
Jainul Musani
Java Collection Framework for BCA Students
by
Jainul Musani
More from Jainul Musani
PDF
JavaFx Introduction, Basic JavaFx Architecture
by
Jainul Musani
PDF
ASP.NET 2010, WebServices Full Example for BCA Students
by
Jainul Musani
PDF
Palindrome Programme in PHP for BCA students
by
Jainul Musani
PDF
Leap Year Program in PHP for BCA students
by
Jainul Musani
PDF
"PHP and MySQL CRUD Operations for Student Management System"
by
Jainul Musani
PDF
Python: The Versatile Programming Language - Introduction
by
Jainul Musani
PPTX
Python a Versatile Programming Language - Introduction
by
Jainul Musani
PDF
React js t8 - inlinecss
by
Jainul Musani
PDF
React js t7 - forms-events
by
Jainul Musani
PDF
React js t6 -lifecycle
by
Jainul Musani
PDF
React js t5 - state
by
Jainul Musani
PDF
React js t4 - components
by
Jainul Musani
PDF
React js t3 - es6
by
Jainul Musani
PDF
React js t2 - jsx
by
Jainul Musani
PDF
React js t1 - introduction
by
Jainul Musani
PPTX
ExpressJs Session01
by
Jainul Musani
PPTX
NodeJs Session03
by
Jainul Musani
PPTX
NodeJs Session02
by
Jainul Musani
PPTX
Nodejs Session01
by
Jainul Musani
PDF
Java exercise1
by
Jainul Musani
JavaFx Introduction, Basic JavaFx Architecture
by
Jainul Musani
ASP.NET 2010, WebServices Full Example for BCA Students
by
Jainul Musani
Palindrome Programme in PHP for BCA students
by
Jainul Musani
Leap Year Program in PHP for BCA students
by
Jainul Musani
"PHP and MySQL CRUD Operations for Student Management System"
by
Jainul Musani
Python: The Versatile Programming Language - Introduction
by
Jainul Musani
Python a Versatile Programming Language - Introduction
by
Jainul Musani
React js t8 - inlinecss
by
Jainul Musani
React js t7 - forms-events
by
Jainul Musani
React js t6 -lifecycle
by
Jainul Musani
React js t5 - state
by
Jainul Musani
React js t4 - components
by
Jainul Musani
React js t3 - es6
by
Jainul Musani
React js t2 - jsx
by
Jainul Musani
React js t1 - introduction
by
Jainul Musani
ExpressJs Session01
by
Jainul Musani
NodeJs Session03
by
Jainul Musani
NodeJs Session02
by
Jainul Musani
Nodejs Session01
by
Jainul Musani
Java exercise1
by
Jainul Musani
Recently uploaded
PDF
What Thema can do: Leveraging metadata to support the discoverability of Firs...
by
BookNet Canada
PDF
7 Essential Types of Penetration Testing Services Every Business Should Under...
by
pandeydevika621
PDF
Supercharge Your Copilot-Driven Collaboration with Microsoft 365 Agents SDK
by
Antti Koskela
PPTX
NTG - Data Center Management System Software
by
Mustafa Kuğu
PDF
"When every team does things "right", but together it turns into chaos", Yozh...
by
Fwdays
PPTX
TechSprint WinterHack — Top 10 Teams Pitching Session we are excited for pit...
by
bajpaitusharoffon678
PDF
How to build hackthon projects from ZERO!
by
ishantyadav1111
PDF
ICT500 - CRITICAL AND CREATIVE THINKING FOR INFORMATION TECHNOLOGY SOLUTIONS:...
by
2024432452
PDF
Title Installing Windows, Linux, MacOS.pdf
by
GeraldAbadajos
PPTX
Introduction to Industrial-Arts Grade 8 ppt Lesson 1
by
FSBTLEDNathanVince
PDF
2026_01_28 - OpenMetadata Community Meeting.pdf
by
OpenMetadata
PDF
Bettersize | BeSEC Series Product Brochure
by
Bettersize Instruments
PDF
Dev Dives: Build and deploy agentic automations - the unified way
by
UiPathCommunity
PDF
Getting Started with Apache Spark: Big Data Made Simple [Free Meetup]
by
Haim Michael
PDF
TrustArc Webinar - From Zero to Privacy Hero: Launching Your Program Right an...
by
TrustArc
PDF
Designing a Blog Using Wordpress
by
markzubi50
PDF
January 2026 OpenMetadata Community Spotlight - OpenMetadata @ Wix.pdf
by
OpenMetadata
PPTX
Jisc Equipment Data Service Update Workshop 3 December 2025
by
Jisc
PDF
Transcript: What Thema can do: Leveraging metadata to support the discoverabi...
by
BookNet Canada
PDF
CI CD Observability, Metrics and DORA - Shifting Left and Cleaning Up! - Febr...
by
Peter Souter
What Thema can do: Leveraging metadata to support the discoverability of Firs...
by
BookNet Canada
7 Essential Types of Penetration Testing Services Every Business Should Under...
by
pandeydevika621
Supercharge Your Copilot-Driven Collaboration with Microsoft 365 Agents SDK
by
Antti Koskela
NTG - Data Center Management System Software
by
Mustafa Kuğu
"When every team does things "right", but together it turns into chaos", Yozh...
by
Fwdays
TechSprint WinterHack — Top 10 Teams Pitching Session we are excited for pit...
by
bajpaitusharoffon678
How to build hackthon projects from ZERO!
by
ishantyadav1111
ICT500 - CRITICAL AND CREATIVE THINKING FOR INFORMATION TECHNOLOGY SOLUTIONS:...
by
2024432452
Title Installing Windows, Linux, MacOS.pdf
by
GeraldAbadajos
Introduction to Industrial-Arts Grade 8 ppt Lesson 1
by
FSBTLEDNathanVince
2026_01_28 - OpenMetadata Community Meeting.pdf
by
OpenMetadata
Bettersize | BeSEC Series Product Brochure
by
Bettersize Instruments
Dev Dives: Build and deploy agentic automations - the unified way
by
UiPathCommunity
Getting Started with Apache Spark: Big Data Made Simple [Free Meetup]
by
Haim Michael
TrustArc Webinar - From Zero to Privacy Hero: Launching Your Program Right an...
by
TrustArc
Designing a Blog Using Wordpress
by
markzubi50
January 2026 OpenMetadata Community Spotlight - OpenMetadata @ Wix.pdf
by
OpenMetadata
Jisc Equipment Data Service Update Workshop 3 December 2025
by
Jisc
Transcript: What Thema can do: Leveraging metadata to support the discoverabi...
by
BookNet Canada
CI CD Observability, Metrics and DORA - Shifting Left and Cleaning Up! - Febr...
by
Peter Souter
Simple Calculator using JavaFx a part of Advance Java
1.
//Argument --module-path "C:javafx-sdk-20lib"
--add-modules javafx.controls,javafx.fxml // SimpleCalc package application; import javafx.application.Application; import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene.control.*; import javafx.scene.layout.*; import javafx.scene.paint.Color; import javafx.stage.Stage; public class Main extends Application { @Override public void start(Stage primaryStage) { try { // Create input fields TextField t1 = new TextField(); TextField t2 = new TextField(); t1.setPromptText("Enter first number"); t2.setPromptText("Enter second number"); // Create buttons for operations Button btnAdd = new Button("+"); Button btnSub = new Button("-"); Button btnMul = new Button("*"); Button btnDiv = new Button("/"); // Result label Label lblRes = new Label("Result will be shown here"); btnAdd.setOnAction(e -> { try { double num1 = Double.parseDouble(t1.getText()); double num2 = Double.parseDouble(t2.getText()); lblRes.setText("Result: " + (num1 + num2)); } catch (Exception ex) { lblRes.setText("Invalid Input!"); } }); // btnDiv.setOnAction(new EventHandler<ActionEvent>() { // @Override // public void handle(ActionEvent e) { // // your code here // } // }); btnSub.setOnAction(e -> { try { double num1 = Double.parseDouble(t1.getText()); double num2 = Double.parseDouble(t2.getText()); lblRes.setText("Result: " + (num1 - num2));
2.
} catch (Exception
ex) { lblRes.setText("Invalid Input!"); } }); btnMul.setOnAction(e -> { try { double num1 = Double.parseDouble(t1.getText()); double num2 = Double.parseDouble(t2.getText()); lblRes.setText("Result: " + (num1 * num2)); } catch (Exception ex) { lblRes.setText("Invalid Input!"); } }); btnDiv.setOnAction(e -> { try { double num1 = Double.parseDouble(t1.getText()); double num2 = Double.parseDouble(t2.getText()); if (num2 != 0) lblRes.setText("Result: " + (num1 / num2)); else lblRes.setText("Cannot divide by zero!"); } catch (Exception ex) { lblRes.setText("Invalid Input!"); } }); // Layouts HBox inputs = new HBox(20, t1, t2); inputs.setAlignment(Pos.CENTER); HBox buttons = new HBox(30, btnAdd, btnSub, btnMul, btnDiv); buttons.setAlignment(Pos.CENTER); VBox root = new VBox(15, inputs, buttons, lblRes); root.setAlignment(Pos.CENTER); root.setPadding(new Insets(20)); Scene scene = new Scene(root, 400, 450); primaryStage.setTitle("Arithmetic Operations"); primaryStage.setScene(scene); primaryStage.show(); } catch(Exception e) { e.printStackTrace(); } } public static void main(String[] args) { launch(args); } }
Download