Java Swing Mastery: Create Stunning GUI Apps Step by Step | Part 1
Feb 18, 2025
Java Swing Mastery: Create Stunning GUI Apps Step by Step | Part 1 our website: www.tutussfunny.com #JavaSwing #JavaProgramming #JavaGUI #SwingTutorial #JavaDevelopment #CodingTutorial #LearnJava #ProgrammingForBeginners
View Video Transcript
0:00
hi welcome to Java suing application project step by step in this course I'm
0:08
going to cover about the Java suing application project step by step in very
0:14
efficient way right from the beginning I'm going to start so here you can see
0:21
we have a first project I'm going to do the how to add two numbers I'm going to
0:28
teach step by step the second project I'm going to discuss about the student
0:34
management system how to work with the grading system step by step here as I show the
0:42
screenshot demo over here the same project we are doing step by
0:50
step the third project I'm going to discuss about the currency converter how
0:56
to work with the currency converter we are doing the step step by step process very
1:04
efficient the fifth project we are going to explain the employee salary
1:09
calculation system which is a simple payroll system we have discussed about this system step by
1:18
step the sixth project we are going to discuss about the inventory management system the inventory management system
1:25
is very famous in everywhere every shop we need a inventory management system we
1:31
have to do the inventory management system we have start from the beginning over here so we have we have doing the
1:38
small fish fish shop uh desktop application there there is a two option
1:45
gram and kilogram how to calculate them we have to do
1:51
this right seventh project we are going to explain the grocery shop management system right the grocery shop how to
1:58
manage the simple inventory right the simple inventory how to manage them we have to discuss about this
2:07
project the eight project we are doing that we are starting the jdbc we have
2:13
the database connectivity we are starting from here how to add the record
2:19
edit the record and find the record and delete the record and update the record
2:25
all the cred application ENT cred application we are cover about the
2:31
section over here after that we have discussed about the transaction this is very important
2:39
part of our project account to account transaction when you are making the big
2:44
uh banking application project how to transfer money one account from one
2:50
account to another we have discussed about this one how to use the transaction in your project we have
2:57
discussed about here account to accounts transaction project the final project we are doing
3:03
the Billing System simple Billing System this these are these two system we cover about the which
3:09
database the Billing System the simple Billing System you will be coverable
3:14
right these are the project we are discuss about in this video
3:21
tutorial thank you for watching hi guys in our last video we
3:28
saw how to download the eclipse ID and how to install the eclipse ID in your
3:34
machine in this class we'll be talk about some basic stuff of eclipse so
3:40
here this is a file okay if you want to create the new project you just click on
3:46
the file menu click new Java project
3:52
okay otherwise you have another option create a Java
3:58
project right so first I'm going to create we have a two options okay here you can go to the
4:06
file new Java project otherwise create a new project this link if you click on
4:11
this one you can you'll be able to create the new project so first I'm going to trle this way file new Java
4:18
project now I'm going to give the name of the project so I'm going to give the name
4:24
example right click next
4:32
click finish we don't create we know we know
4:38
it so here you have to expand it here this is your project name which is a
4:46
example uh inside the project we have a SRC package here okay so here there will
4:52
be the jar system libraries the all the liaries are reside on here in this Li
4:58
folder Okay so here click on this one SRC package right
5:06
click here I'm going to create the new Java class select new
5:13
class so here you have to name the class name we have to give the name of the Java class so I'm going to give the name
5:21
here as example right after that here you can see here which method sub would you like
5:28
to create I have to create here as public static vo main here this one okay
5:35
public static vo main click finish right now now here this is a
5:43
class name CL start with capital letter so
5:49
here this is the main method of java public static white main string
5:57
args uh this this option I already enable when you create the class right
6:03
so that it will be generated now inside the main method I'm going to write the
6:09
hollow World programming in Java right so let me look at how to write the H
6:14
programming so let's this one we no needed we just let's remove it now I'm
6:20
going to write first letter start with capital
6:26
system system Dot it will if you put the dot you can see
6:32
all the properties will be there here you have type out here oh if you type
6:38
all here out click on this double click on this it will be display over here dot
6:44
print l so print print Ln here this one select this
6:53
one right now inside this inside this bracket
7:00
you have to write within this bracket you have to
7:05
write Hollow world you have type h right that's it okay you have successfully
7:12
write the H programming okay this how we have write the H programming system.
7:17
out. print and within the bracket you have to write uh within the bracket you
7:24
have to write double quotation mark double inside the double quotation mark you have to write the hollow right so
7:30
how to run the program it is very simple in Eclipse you just right
7:36
click here Runners select this one if you click on
7:41
this your project has been running okay this is the one option we have a several
7:48
options are there this is your project right click here also run Java
7:54
application right otherwise we have another option here run
8:00
click on this display button your program will be run right we another
8:05
method here there will be a final menu this menu click
8:11
run option here Run Okay shortcut key will be control+ F1 right now we'll be
8:19
run the programming click displ button it ask to save and launch
8:25
okay here allow world will be print or the console here is a console it will
8:32
printed successfully this how we have write the hollow World programming in
8:38
Eclipse we will see you in the next video thank
8:44
you hi guys in our last video we saw how to write the H programming uh in this
8:50
class I'm going to teach about the uh aramatic operators in Java so how to
8:56
work with the arithmetic operators first what I'm going to do is here how add two
9:01
numbers so first I'm going to input two numbers here so
9:07
here just write here below system do out. print
9:18
Ln right so here if you
9:24
write numbers 2 + 2 right here here this
9:30
is the text so you have to you must write within the double protection Mark
9:37
if you are going to write the integer values you must write without the double cation Mark okay so what is the
9:43
different I'll show you in few minutes okay so let's execute the program and
9:50
check here 2 + 2 4 will be the answer right
9:57
now here if you are right I just copy this one contr C to copy contr V to paste
10:05
here and here if you right inside the double quotation mark what happen What
10:12
will be happen it take it as a text okay what
10:18
will be the output is it it will be printed as 2 + 2 it the program will be
10:25
considered as this this also the text so if you run and check
10:31
here answer will be 2 + 2 okay when you are writing with the
10:37
numbers you must know you have to write without double this is very important
10:44
stuff right so let's remove this line now I'm going to this is the addition so
10:52
I'm going to write subtraction so same example I just
10:58
copy paste [Music] below paste go here paste right now
11:08
here we have to change it as this one should be substraction this one should be
11:17
multiplication right this a symbol the computer okay the division right now let's see the output
11:26
what will be the out so let's run and
11:31
check here first it will be two numbers are calculated so 2 + 2 answer will be 4
11:41
after that subtraction 2 - 2 0 will be the answer after that 2 into 2 it will
11:50
be multiplication answer will be four after that 2ide 2 so answer will be
11:59
one this are the uh answer will be printed right very simple okay you must
12:05
understand this all the stuff uh if you are moving to the swing application development in Java this is very
12:11
important important stuff you must know this example way thank you guys we'll be
12:18
see in my next video hi welcome back today I'm going to
12:25
discuss about variables her variables are considered as a memory location it
12:30
used to store the value information let me look at the variable
12:36
declaration it consist of three types data type variable name and value if you
12:45
look at the data type there will be the various data types are available in this
12:51
example I written as a in data type if you want to store the integer numbers
12:59
you can use this data type int variable name you can create any
13:05
name here I just written as x value okay I have store in this variable
13:13
x uh 10 so this is the efficient way to write the variable declaration start
13:20
with data type variable name what's the value you are going to store store on
13:27
the variable okay this this is a simple stuff okay now let's moveing to
13:33
the example variable declaration first I'm going to store the
13:41
text values so we have to start with the string data
13:47
type variable name I'm going to write as name equal value I'm going to store the
13:55
name so John right so if you want to write the text value
14:02
you have to start with the appropriate data type which is a string this is a data type this is a
14:10
variable name the value which you want to store okay this John will be assigned
14:15
to the name right okay now what I'm going to do here I'm going to print this
14:22
value so how to print is you have to type system do out do
14:29
print
14:37
Ln now simply the John will be assigned to assigning to the name now the joh
14:45
value will be stored in this name variable so if you are write the name
14:51
here inside the system.out.print John has been printed
14:58
now let's Let's test that if you run the
15:03
program okay you can see the answer John will be printed
15:10
successfully right now I'm going to print the number so
15:19
first we have to implement the data type as in int so variable name I'm going to
15:26
give as x value I'm going to store as
15:32
10 okay so here the here the string value this is a text so when you are
15:39
writing the text you have write within the double quotation mark right when you write the integer you don't write the
15:48
double quotation mark you just write like this okay right you must understand
15:53
this stuff this is very important stuff when you are professionally in Java
15:59
after that I'm going to print this value system do out. print
16:07
Ln now here this variable I'm going to call it
16:15
here now let's look at the
16:21
output 10 has been printed that this is the VAR data type this is the variable
16:28
name name this is the value the 10 will be assigned to the X so the what is a
16:36
value store in the x 10 so after that if
16:42
you are going to print the value so you write system. out. print and if you call
16:47
the X here 10 has been printed now I'm going to print the
16:54
decimal value so the relevant data type should be
17:00
double data type I'm going to write as
17:06
X sorry data type double variable name I'm going to write as
17:11
y value I'm going to write as
17:20
2,550 this is the value I'm going to store so how to print this one so you
17:26
write system do out dot print
17:34
Ln now the Y I'm going to call it here right now let's look at the output
17:43
if you run this program you can see here
17:49
25005 has been printed okay it is working perfectly this how the variable
17:56
declaration works I I hope you guys will understood this these things well this is very
18:02
important stuff when we are writing the swing application in Java thank you for
18:08
watching we will see we will be see in our next video hi welcome back in this video I'm
18:17
going to teach the simple example input the student name marks to
18:24
calculate the grade when you calculate the grade
18:29
there should be the condition if the average is more than
18:35
50 grade is pass otherwise grade is
18:41
fil now let's do this simple example so let's go to the
18:49
Practical now here this is a simple example I did it here so here you can
18:56
see first I have created the four variables sorry five variables I have
19:03
created first one is a name so here what I did here is go to the question back
19:09
input the student name here I have input the student name marks so I have input
19:16
three subject Marks here so I have created Marks One marks 2 marks 3 here I
19:23
have input three marks 80 70 and 50
19:29
after that we have created another variable
19:34
great so here first string name I have created
19:40
the string variable John this is the value this value should be assigned to the name
19:47
variable after that we have created the three integer variable we have store
19:52
three integer data this all are marks this 80 should be assigned to the max One 7 20 marks 2 assign to Marks 2 50
20:02
assign to Marx 3 after that we have to create another string variable
20:09
gr now first step what I'm going to do is here I'm going to calculate the marks
20:16
student marks I'm going to calculate it so here I have created the variable in
20:21
dot equal Marx one plus Marx
20:30
2 plus Marx 3 we have created we have
20:35
calculated this three marks and assign to the top variable this how we have
20:42
calculate the total after that after calculate the total I'm going to calculate the gr
20:52
average we have calculate the average so we have to data type we have Chang it as a
21:03
double I have created the variable average variable name average equal
21:09
total divide by 3 why we have put here this three is how
21:15
many subjects we have a three subjects so we have three if you have if you have
21:20
four subject you have divide by four if if you have five subject you have divide
21:27
by five okay total we have divide by the number of subject we have a three subjects marks entered here so we have
21:35
put it here as three after that after calculate the
21:42
average we are going to calculate the grade we are moving to the question when
21:49
you are calculating the grade it should be a condition if the average is more than
21:54
50 grade is pass otherwise grade is
22:00
now let's go here when you are writing the condition you have to start with
22:06
this if this average this calculate and
22:12
assign to the this average variable so what is the value store in the average
22:18
average is greater than 50 so we have already create the grade
22:23
variable over here we have to grade equal pass you have to write the
22:29
text as pass here
22:34
else if the average is not greater than
22:39
50 grade grade is free right this is simple code we have
22:45
to write okay if the condition is true if part will works if the condition is
22:51
false else part get executed
22:59
after that we have print the all the values okay first I'm going to print at the total so this is a total to your
23:08
total is printed here your average
23:13
average your great great
23:19
right system. out. printerland your total is what's the value store in the
23:25
total variable it has been printed what is the value store in the average
23:31
variable it has been printed what is the value store in the grade variable it is
23:37
f okay if the average is greater than 50 it works here okay if it is false works
23:45
here now let's execute the program and check what is the output will
23:51
be let's execute it click okay so you can see the output
24:00
your total is your your total is this your average
24:06
is 660 now the condition is true because
24:14
the your average is 66 your your condition is true
24:20
because what is your condition if the average is greater than 50 grade is pass
24:26
so the 660 is greater than 50 so the grade is pass
24:34
your grade is pass will be displayed I hope you guys you understood
24:39
this example well if you have any doubt you can ask me I'll see you in the next
24:47
video hi welcome back in this video I'm going to teach another
24:52
example let's read the question input the employee name and the basic salary
25:01
calculate and display the net salary using following
25:06
condition when you are calculating the net salary we have to use this following
25:13
condition let's go through the conditions one by one if the basic
25:18
salary is more than 50,000 then include 10%
25:27
tax if the basic salary is more than 30,000 then include 5% tax this is a
25:36
condition we have to use to do the program let's back to the eclipse so
25:44
this is a simple example right so first what I have did here is first I have
25:49
created the string variable variable name I'm going to give
25:55
as employee name this is the value have assigned it Peter employee name I have
26:01
assigned it here is Peter where the Peter will be assigned to employee name after that I have
26:07
created the three double variables first is when you are declaring the
26:14
salary instead of the in you have to declaring a double right so double salary equal this
26:22
is salary have assign it 65,000 here text
26:28
double text double net cell right so I have created the three double
26:36
variables right so after that we have to check the condition let's back to our
26:43
question here employee name and basic salary and calculate and display the net
26:49
salary using following condition if the basic salaries more than 50,000 include
26:54
10% H Tax if the basic salaries more than 30,000 then include 5%
27:02
tax right now here when you are creating the condition you have to write the
27:09
start with if your basic salary is more than more than this more than means a
27:17
greater than sign your basic salary the salary is greater than
27:23
50,000 then we have created already created the variable text Open Bracket
27:28
and close bracket inside the bracket we have write text this way get the
27:34
variable here equal we have to calculate the basic salary so basic salary the
27:42
salary into 10 percentage 10 10 percentage tax
27:48
so 10 divide 100 this is simple calculation we have to use to calculate
27:54
the tax if the basic salary is greater than
28:00
50,000 if it is not greater than 50,000 go to the is
28:08
part and display the uh calculate the 5% tax if
28:17
the if the salary is more than 50,000 it's it's go to the else part and
28:23
calculate the 5 percentage tax so you have to write the basic salary into 5% tax this
28:33
simple tax calculation right the simple tax calculation after calculate the tax I'm
28:41
going to go to calculate the net salary you have write the we already created
28:47
the variable inel equal salary the basic
28:54
salary we have minus tax we have to calculate the text like this after that
29:00
we have to assign the variable net salary this variable after
29:06
after minus it salary minus tax okay what is the tax you are getting
29:11
on this variable you have to get them here you have to get the to total value here you have
29:19
to assign it here right now after that we have to print one by one your employees uh name is what's the
29:27
name you have to print Peter after the tax what is the tax you have calculated if the taxt is more than
29:33
50,000 work this code if the uh basic salary is below 30,000 work
29:41
this code you calculate the tax over here after that net cell right net what
29:46
the net salary printed it will be displayed here this simple program we wrote okay this this a simple program
29:55
V I hope you guys you understood so far let's run and check the
30:01
output right if you go to the output here we have a we need a space so that
30:07
it will be display the without space here we leave the space like this now if
30:12
you run and check here it's working perfectly well
30:17
right so here uh now here the employee taxes
30:26
uh calculate as percentage here you can see the 10 percentage of Tex
30:33
6,500 so the net salary will be this is the net salary right so now let let's
30:38
change change it as this one as a 25,000 35,000 like
30:46
this 35,000 what what will be the output now now let's run and
30:53
check this time here this this condition is not working
30:59
this not this condition is not work go and check the second condition this condition is false first condition
31:06
should be false because the basic salary is not 35,000 uh not uh basic salary is not
31:16
greater than 50,000 this salary is this condition is false let's go to the second condition this condition is true
31:24
so the 5% is printed right now now here I'm going to write another
31:32
condition over here that same condition I just copy and paste it over
31:40
here now let's modify the program little
31:45
bit below 35,000 below 30,000 no text included so how to write
31:55
this one text equal below 30,000 Tex equal 0 that's
32:03
it those salaries below 30 no tax will be included so tax amount
32:12
will be zero right now
32:19
let's put it here as 15,000 now let's run and check what will
32:24
the output here tax tax is
32:29
zero employee get the salary as without text this is a employee net
32:35
salary net salary right now ex the code and
32:43
check now the employee get without text those uh those who are getting
32:50
their salary as below 30 if you have any
32:55
doubt so far you can ask me anytime I here to answer it thank you for
33:02
watching I'll see see you in the next video
#Educational Software
#Java (Programming Language)
#Programming