Complete Registration with image upload Java JDBC (Download Source code)
2K views
Apr 23, 2025
Complete Registration with image upload Java JDBC (Download Source code) Source code : https://www.tutussfunny.com/registration-with-image-upload-java-jdbcdownload-source-code/
View Video Transcript
0:00
hi friends welcome to Furniture and today I'm going to take the nice registration form along with the image
0:06
uploaded after image uploaded we will be able to find the uh your registration
0:12
form and if you enter the employee ID the respective details will be displayed the the respective fields okay so text
0:21
field display radio button display combo box display image will be display over
0:27
here okay based on the ID I enter the person all the relevant information will
0:33
be display okay how to make step by step we'll teach so first what you are going to first we have to make this nice user
0:40
interface so how to make it so I'm going to go to uh get the new project so the
0:47
previous one all things I want to now I'm going to go to file new this
0:55
is netb if you have not installed the netp ID in your machine you have to install them that is must that best
1:01
editor for uh writing the codes okay so let's what you going to do so I'm going
1:06
to go to net pins
1:14
net download you have to go here and you have to download the net site first and
1:20
install in your machine okay so you have to download the net site okay you have to select the your operating system and
1:28
you have to download it okay after the install them got to get it now after that you have to open the P ID you have
1:35
to select this Java with Java application click next you finish check
1:40
main class you have to uncheck it this one you have to click this one here as here uh
1:47
office click finish
1:53
now in the office you will be able to see this is the office okay so here what I'm going to do is I'm as a default
1:58
package select the default package right click new Java frame form here you
2:03
select
2:12
registration this form what you going to register do the registration part
2:18
first you have to make the panel outside the panel look like
2:23
this before that select this panel right click
2:29
properties course p center so when the form is loaded it it must be display at
2:37
the center so we have to enable this option then only the form will be display at the center of the screen
2:43
after that I have to select this frame go to source control
2:50
F there is a box here you type UI press enter key here it's default
2:58
come as nippers nas you have to select this one as a
3:03
metal so the you type metal ml
3:09
metal here it's working successfully now what you're going to do is here we have to make this respective side uh we have
3:16
to do uh all the designs okay so we have select this one properties i have to
3:21
make the color here as a background color uh little bit this color it's
3:28
great so that you have to little bit dark not
3:36
dark so okay so after that I'm going to drag one
3:43
label regist this one
3:50
properties click on this bold 24
4:11
Foreground color i'm going to make this color change it as
4:20
white uh 20
4:27
8 that's
4:32
it what I'm going to do is I'm going to go to drag the
4:38
panel so here we have drag it so what you going to do is we have to
4:44
uh this all things you have name first name last name gender address all things
4:49
so you have go to the panel and do it it's very good stuff
4:59
select this one properties border
5:07
border label first
5:15
name select and here we have to change this some asset 14 with
5:24
gold 16
5:36
with text field
5:45
select
5:51
cotton text field you have to remove them you name this one
5:59
as txt left
6:05
name select both this one and this control C to cop
6:11
paste this one last
6:19
name this one should be t last
6:25
name last
6:32
name second one is gender copy control copy
6:48
gender gender i'm going to set the radio
6:57
this one I got is
7:03
this male let's check this color it's a
7:14
female that's it male and
7:21
female okay so we have to do the things look like this way so after that I'm going to
7:28
make the thing is the gender female address same thing control C to copy this one to
7:34
be the
7:43
address that also I'm going to select this one control C one after that we have write another
7:50
one is department and salary same thing control Copy control
7:56
database this one should be the
8:08
department you have to put the combo
8:23
box this one i have to write uh
8:31
thing select this one properties model property here we have
8:36
change this one as a accounting department
8:42
accounting marketing we have three different
8:48
department here we should enter here after that we have another field basic
8:55
cell to copy
9:03
past copyr copy
9:08
past after that the
9:13
photo copy should be the
9:26
photo you have to select this one label you go to this
9:35
label you have
9:44
type properties you have t the photo border you have se the bevel
9:50
border as well photo we have a size you have mention the size of the
9:56
uh width and
10:02
height this one
10:09
250 enter 250
10:37
logo here we are the photo has been displayed okay the simple stuff we have
10:43
writing over here a simple form design this is a photo
11:23
after that what I'm going to have to done the the things well after that I I need a button two
11:30
buttons okay and browse
11:36
Okay button okay mean this is save
11:43
button button right click you have to type here background color you this
11:55
color forground I'm going to change as a white change it
12:03
bold and
12:11
Right this one also control Copy control past second and another button which called as
12:24
browse the simple interface we have
12:29
made i hope you guys understood the things i'll see you in my next video thank you for
12:35
watching hi friends welcome to tutoing channel in our last class we have complete the application if you have run
12:41
the application you will be able to see the user interface look like this so we have to adjust the things little bit
12:50
here now let's
12:57
again here this buttons so first what I'm going to do is I'm going to go to do
13:03
this browse button code so what I'm going to do is I'm going to go to my
13:09
uh so here I'm I'm going to explain this
13:20
code click on this button and press paste on it
13:30
okay so what I did here is so here we have to do the another couple of
13:49
things we have to create the variable use user image
13:54
and relative we have create two different variable this is the bite this is the string okay so here what I'm
14:01
going to do is I'm going to go to do the thing so here first this is LBL photo it
14:07
is LBL so change this this one i'm going to change it as DX first
14:15
name last name this one should be the change
14:21
as this one radio but RB mail
14:29
this one I'm going to use RB feed this one I'm going to change it
14:44
as CPA
14:50
department this is this is the combo box so that we have to give the name this one should be the txt
14:59
address we have to change the names this one I'm going to change it as txt
15:05
channel so we have to change the name that is this one should be we have t l photo
15:13
we have change all the names successfully okay now what you going to do is here you have browse button the
15:20
browse button what I'm going to do is I want to here first I I'm run the program and show you click browse you can have a
15:29
nice dialogue here you will be able to browse the photo whatever photo you need you will be able to browse so there we
15:36
have to go to browse the photo your desktop I'm going to desktop I'm going to uh browse the photo so the that fan
15:44
uh what are the photos so that f face uh you provide this
15:58
face uh here we have select this one as of here the photo has been selected so
16:05
whatever photo you will be able to select okay so what the thing is what I did is what photo you have selected it
16:12
will be coming here so here I'm going to go to select any other photo that uh some other any photo
16:20
select this is coming here it's come so here you have to put your photo okay so
16:25
here what I did here is there is a class which name is file chooser this is a
16:32
class where we have this is the class where it reside on this swing under the swing package it's a file chooser what
16:38
is the thing this does is when you click on this browse button this class able to browse the
16:46
photo okay this class is the class which will be create the object of picture
16:52
source so it open the open dialog open dialog if you click on this browser this
16:57
is the open dialogue it is open this is a class where to do this things okay the
17:03
file chooser is a class we have created the object of picture choose yeah how to create the
17:10
object using new keyword so the feature choose dot show open dialog me show this
17:16
dialog box this the thing we have after that what I did the second
17:22
one we have another class which a file okay this file we have file sour you put
17:28
it to a get selected file what this class does is he have to select the file
17:34
it this is a class uh able to browse the file location this is the class which
17:40
will be ableut to select the file select the file mean it goes to the desktop you
17:46
have to select whatever file i'm going to select this one this file has been you have selected it selected for this
17:52
fan thing is this we have go here uh the fan if I click on this it it is
18:00
it will be able to select this particular file okay it will be able to select this file this is the things it
18:07
will be does okay so that we have this file okay so this is the class where it
18:12
will be do that action as well okay after string path get absolute absolute
18:18
mean it is getting the path of that file where you getting that file after the buffer image you have to create a class
18:24
buffer image this image class we have read that file okay just read that file
18:30
what the file you are selected you have read that file so here we have a we have a we have a class image icon
18:38
this is a class which will be show into that selected file would be show into
18:44
this label okay that is the class if you use that class that class allow you to
18:50
show that file into the respective frame this is the class which help image class okay image this class
18:58
icon you have set the 250 250 mean this is a dime dimension size this is the
19:04
size of this window okay this file okay this is the size we have put it here
19:10
scale default this is the scale default one after that it will be set to where we have select set it lbl photo this is
19:17
the lbl photo name it will set it that's the thing we have did so far very
19:23
simple okay okay so this one able to browse the
19:29
file this the file we have select the file here we have display the file into this frame this is the three things
19:36
you must understand when you go to browse the file after that this is
19:42
the things we have help you to when you browse the file what here this file will
19:49
be here what's the file you are browsing it's coming to our project here you can see here okay so now again I'm going to
19:56
run the project and show you now I'm going to import any other file other photos you can see this is the important
20:02
things we have to it okay when you buy when you this this project you just put
20:08
the pen drive and go and put it to some other friends machine so this image is
20:13
needed if you save any other drive in your artist it won't work so we have saved all the images inside this project
20:21
so that it is working okay so here we have a uh another image i'm going to
20:27
getting this one
20:32
uh something this photo is coming here you can see here so here this photo is
20:37
coming here now you can see notice that so whatever image you are browsing it is
20:42
come inside this project okay so that's the thing did by this
20:48
function okay so after that what I did here is after your browser and open what happen is file you have created another
20:56
class file image gr equal file it is it is this your when you browse the file
21:03
that browser file will be imported into inside the images
21:09
package the images package is created inside images package
21:14
images packet src mean the source src source packet we have created the images
21:20
file this file this images will be stop okay if the images exist is not working
21:27
if if the image is existing which the same name you are saving is not working
21:32
different name okay so here you can see the path okay so so that we have
21:38
selected relative path as well image is here this image is there relative is m when you save the image into the
21:44
database okay so we are not here we are not save the images okay we have save
21:51
instead of save the images in the database we have save the path that is a professional way to do the program we
21:56
never store the images inside the database that is wrong if someone teach uh we have to save the images the images
22:04
we should save inside the database it is completely wrong we only we keep the path of the image inside the database
22:10
that is the thing we have to add so this is the process this is the image process
22:17
this how the process is working uh input uh uh file input stream this how the
22:23
process is working after browse the image it will be uh after browse the image but the things is working you will
22:29
be able to browse the image after that what I'm doing you select the image after select is open you have to do
22:36
simultaneously the image is im the images goes to display on that
22:43
frame as well as it is go this particular selected images go inside
22:49
this package as well two things is happen so it is done by this
22:54
operation okay this this complete code I I I put into my video description you will be able to get them uh I hope you
23:02
guys will think so far well okay so in my next video tutorial I'll be
23:07
explaining more thank you for watching hi friends welcome to tutoing channel last class we have completed the
23:14
things of this okay browse button okay how to work with the browse button uh
23:20
let me continue the rest of the part now what we are going to do is I'm going to add the record into the database okay so
23:26
first I'm going to create the database so go to the zam open on the zam server
23:32
click start click start click
23:43
admit this is your admin dashboard now I'm going to create new this one I'm going to name it as
23:53
uh create
24:00
Osa this is a just company okay i just give the name OSA
24:06
this is a database I have created inside the database what are the column 1 2 3 4
24:12
5 6 seven column you have to create along with eight columns along with the ID you
24:19
create eight columns this one should be the registration
24:34
first one is ID primary key
24:43
second is a first
24:54
name last
25:02
name
25:10
gender male or female after that we have to take the
25:20
department address
25:26
department
25:32
address
25:41
department salary any
25:49
photo right these are the column these are the
25:55
respective data types okay so we have to we are going to create this one click
26:00
save button it has been created successfully you will be able to see it has been
26:06
created successfully in myq perfect we have done the perfect
26:12
right now so what you're going to do is now I'm going to go to
26:18
uh
26:29
using now what I'm going to do is I'm going to go to do the save bar save path
26:35
okay before that I'm going to uh this is our project the project we have to add
26:41
the MySQL uh library so that is important stuff if you have not installed the MySQL jar
26:49
file you want in order to connect our uh ZAM this is our SAM MySQL database along
26:58
with my net bins we need a driver that now I'm going to type
27:04
MySQL jar click on this
27:13
select the operating system platform independent okay select as platform
27:18
independent this you download okay you have select the operating system which
27:24
you need if you are Mac user you can select as a Mac okay so here okay so here platform simply select platform
27:31
independent it will be support everything okay platform independent then means whatever operating system it
27:37
will be supported you can whether you can use it Linux or Mac or anything okay
27:44
it will uh supported you Ubuntu user you can go along with
27:51
this so I'm going to go along with this one MySQL connect so I have click no
27:56
tags okay you just click no tags and if you click no no tags and just start my
28:02
you click on this link your download has been beginning so I already installed
28:07
the I already downloaded so I'm going to import it select the library file folder add J folder select this one mysql
28:16
connected open it's open successfully okay now I'll be able to connect so I'm
28:23
going to go to the source so first I'm what you're going to do is I implement the name space sorry
28:31
import java dot
28:37
SQL dot now if you write the SQL all you
28:44
will be able to write all the classes based on SQL okay so you have to write this
28:51
connection this is a class which is reside on the SQL
28:56
library after we have to prepare
29:06
statement PST this allide on that
29:12
okay now I'm going to establish the connection so this is the connection this all the things I have given you
29:17
this codes simply
29:29
Right
29:37
here you can see here the here we have writed here simply your
29:48
system dot
29:58
out dot
30:03
print yeah you have to write this one ex here whatever your error you have got
30:10
it here okay so here this is a connection method i have read connection open and close it so here the inside the
30:18
try and catch if the error will be occur while the coding the catch will be
30:26
getting the catch will be saying what kind of error you are getting on the try that's a purpose of you writing the try
30:33
and get very easily identify that in order to easily identify the error okay
30:38
so where the error is coming from the database path or driver there are so
30:43
many things okay after the use credential and everything So here what I did is string driver so
30:51
MySQL this is a new way to implement the driver of MySQL MySQL this driver you have to register using com MySQL CJ JDBC
31:00
driver the URL path where you have reside in your uh database my database reside on the
31:07
zap is a database so your path this is the port where my database is running uh
31:13
330 06 my database name which is a don't mention the name of the database which
31:19
is a OS this a name okay so this is a after that the user credential when you
31:25
install the MySQL the if you install the zam server default without changing the username and password default username
31:32
and password root is a username default username password is this a user credential of my SQL okay so this is
31:40
this is a very important stuff we have to number okay this is very important stuff this is when you register the
31:46
driver after that you have to select the path where your database is resided after that you have to tell them the
31:52
username and password of the data uh your database okay after that you have a
31:57
class for name what is the this is the driver you have to assign this driver this driver
32:03
you have given here class name here you have registered or you have given the path driver manager get connection this
32:11
is the URL your path is recited this is the user credential username and password after this all are correct the
32:18
message is coming database connected successfully let's run and
32:23
check okay you have go to the console and check okay it's not coming because this
32:29
is a constructor you have to this one you have copy this call inside the constructor of the class the we how to
32:36
find the constructor the the same name of the class the method name should be there it's called as constructor when
32:43
the class is running the constructor is running first okay so you have write this call
32:50
this okay the same name of the class the method name should be same it's called as
32:57
construct okay the database is connect you can get the message of database is connect now your programming is running
33:03
successfully keep in Thank you for watching i'll be get it in my next video tutorial
33:11
time now let's run the project this is the project you can see
33:18
now what I'm going to do is I'm going to go to uh we have to put the title of the project so you have to click on this
33:25
project right click properties title you have to write registration
33:33
there is a title get option press enter key now you can run the project you will
33:38
be able to see the title the title is must get this the
33:44
title is must okay so whatever what I'm you will be able to here enter the your
33:50
all the things you will be able to enter okay so this is not a good thing but
33:56
gender selection okay because we have both we selected okay okay this one instead of that we have to write a group
34:06
box so we have a group box here radio uh button group you have to put it like
34:12
this drag on the form now we select this
34:17
one properties we have to group group uh
34:23
yeah that's this group it's none click on this group one okay this one also
34:28
select this one select this one group one
34:34
select then now let's
34:39
check click on it okay now it will be you can select only one you can't select
34:47
both at a time okay this is a very must because you never ever learn this things
34:52
okay so the this is the things is very must so when you are select the radio button uh here male or female you can't
34:59
select both okay so we have to use the group uh that that option okay button
35:08
group that option will be solve your problem so we have to understand this one now what you're going to do is now
35:15
I'm going to go to save the record so save the part we already create the databases right so databases we have
35:21
create the databases right now I have create databases this one our databases these are the following
35:28
columns we already saw this one now I'm going to go to double click
35:34
on the save button we already saw it in our last video we have successfully connect the databases and all now this
35:40
are code this all the code i will give you the link okay so I have create a separate function for that so that I
35:46
have got to over here I have past this one the separate [Music]
35:53
function I will explain don't worry if I return this it take too much of time to complete the that's why I just copy and
36:00
paste this one okay so we have to simply we have to write it this one okay now
36:05
let's this one this radio button copy this paste on it
36:11
here paste on it here female L
36:18
copy paste on it here get the
36:24
department department CPA department here that's it that's the thing you have to write
36:30
okay now what I'm going to do is first what I did here is we have created that
36:36
this one here goes to below
36:43
now you can understand first you have these are the columns okay so these all
36:49
the columns we have to assign into the respective variable so you have create the variable if name what is the name
36:57
you are typing on this text box you have to assign to the this variable okay so you have write txt dot get get name what
37:05
is the name you are typing on that particular text box you have to assign to this variable what the last name you are typing it assigned to this last name
37:11
variable okay what address you are typing it is assigning to the address
37:17
variable after that gender gender we have a multiple choice male and female
37:23
so we have to choose one choice at a time you can't select both okay whether you are male or female okay so you have
37:30
to select one option okay gender is a one option so one option first you have
37:35
to click there if RD RD male is selected this mean there is a function called
37:43
select is selected okay this name is is selected rb mail if you select RB mail
37:50
is selected you already create the variable you see this variable equal
37:56
into RB male get text okay if it is otherwise you have selected female it
38:02
goes to below okay you no need to write again uh RB female get selected if it is
38:08
true execute this block of code if it is false go to else part and work this block of code you have to understand if
38:14
you select the female is corrected if this block is corrected it work this if block if it is fail it goes
38:23
to if it is particular condition is success it is work this block of code if it is fails go to you can understand
38:31
this after this go the another one we have to select this one as a department
38:37
is which is a combo box we have we have to cast string we have write like this
38:42
you have write here instead of writing you can write like this also possible two string
38:49
method okay both are same some other tutorial I have
38:54
explained two string method okay you have to learn both okay so you have to learn both okay this is very good
39:00
practice okay you have to cast it here or here okay that's a very good practice
39:05
so we are going to put it here okay this is very practice if you there are many
39:10
expert program we are putting like this okay because this is this is essential stuff you must learn this you have to
39:17
cast it okay this is the casting you have to make this one you have to what
39:23
is the thing is this casting mean you have to convert into string that's your casting you have do the casting things
39:28
okay your casting you have to write like this way here you have to put and convert it after that what is the value
39:36
you are selecting on the particular department it is assigned to the department variable path which is a
39:41
photo photo mean we are not going to we are not we are not going to save
39:48
the photo directly we have to instead of the photo we have to save in the database we have to save the path of the
39:54
photo rather than save the photo in the inside the database you have save the path of the uh photo path of the
40:01
database okay we we could save the photo into the database but the database is overload we we have we we have not saved
40:08
the photos okay okay we could uh someone asked me shall we uh store the photo
40:15
inside the database yeah you can but it is not a efficient way to store the datab photo into the database okay
40:22
instead of instead of save the photo you have to save the path of the photo where
40:27
your store is resided a photo is resided inside the our this folder inside the
40:34
images folder you have to tell them the path where your photo is resided okay so
40:40
when you open up the photo that uh we have given that part as well and along with that name it will open up this is
40:46
the essential stuff this is how we have inside the we have to upload the photo
40:52
you can inside the folder you have a package inside the package you have for
40:58
the photos are uploaded this is efficient way you have to do the program how do you prepare statement
41:05
prepare statement you have to do the uh rest of the coding here you can write
41:10
in your first name you have this this name match with this you have to create the prepare statement so you have to
41:16
write uh you can write connection object connection prepare statement which is handled by the query management query
41:23
management now all the variable are equaling equaling to after that what I
41:29
did is we have to going to save inside the database so how to save the database inside into which table I'm going to save the data I'm going to save the data
41:35
inside the registration table which is the registration you have to first you have to check the double check the name
41:41
of the table whether it's correct or not okay for that name the first
41:48
name last name address gender
41:54
department here I have put it up so you write I put it a part so the you have
42:02
write salary here the batching salary here photo I put the photo here your right photo that's it this no problem it
42:11
is it okay so that 1 2 3 4 5 6 7 so 1 2
42:17
3 4 5 6 7 is there we don't need ID ID
42:22
ID must be the auto increment part so we have we don't have to include here okay when you add the record ID will be auto
42:29
if you want to manually set the ID you can But auto agreement is best way okay
42:36
so the ID will be I have set it in the database as a auto agreement okay so here in the structure you can go how the
42:43
ID generated ID which is a primary key it's auto increment so you don't need to
42:49
put the ID column over here okay we when the record is added the ID should be
42:54
added automatically so that you don't you don't bother about this one it is it is automatically care about the
43:00
databases okay so after that what I did here is this these are these
43:05
lines here this one assigned to this variable this assigned to this variable over here this all the things variable
43:11
this all the text boxes assigned to the particular variables this variable I have put in the data first name last
43:17
name address gender department this one should be the path
43:25
uh path uh path uh okay the photo just a relative path you write the relative
43:31
path so here this one should be the relative path mean we don't need this one this path mean relative path
43:38
mean when you browse the photo when you browse the photo you can see that when you browse the photo relative path
43:45
relative path mean when you browse the photo this a relative path where your
43:50
photo is resid Okay in this directory take your name of the photo and it will be take care of it
43:57
okay that's the thing you write okay you don't need this one path okay take care of that photo it is
44:06
take care of the length over here and put it to here okay that's thing you have right salary what you entered here
44:12
it is assigned salary value okay so this function we have to call control C copy
44:18
inside this save that's thing we have to save this
44:23
function let's check
44:30
Sean Peter send mail marketing department
44:37
address India salary
44:42
12,000 browse the
44:55
Well you have to put actual photo over here
45:14
open it i just put this photo click hit save
45:19
button uh what happened it's not
45:28
saved second
45:35
database not working that's a
45:57
problem registration uh okay so here we have a we didn't get the error so you have to
46:04
write the what is the error there so you have to write the state then only we can
46:11
check the error so that the error is not display you write this one now let's check the error now now
46:19
this time we can check the error is not we put something like okay so that
46:26
write a browser uh we can check it
46:41
okay okay here now this time uh CGB incorrect it's uh the
46:49
problem registation photo this photo photo is the things
46:56
uh what is the problem photo ah okay the problem is this the
47:02
column we have the it is said the incorrect columns okay we have to adjust the columns name correctly the problem
47:10
is this here we have follow the column instruction so here we have write it
47:15
here the same structure you have a gender you write a gender over
47:26
here gender of the address
47:31
department [Music]
47:39
salary photo so the the data is so look like this first name go to here last
47:45
name go to here uh third one is a gender gender gender follow the steps go
47:53
here after the address go here department go
47:59
here department go here after that the salary goes to the here salaries goes to
48:05
here after the photo so you write 1 2 3 4 5
48:12
6 7 okay you have to write a photo photo is some problem so the here is a photo
48:18
you have photo you have to match the name sorry okay now let's again execute the
48:24
program uh incorrect integer value integer value correct
48:30
integer what is the integer value okay the photo is not integer
48:36
that's why that value is I accidentally put the data type as integer it's a watch okay that's a problem okay that's
48:44
that was the problem now
48:50
let if you put this one we will be able to get the error what's the error is
48:55
there okay otherwise the error is not shown
49:03
up that uh I remove that okay
49:10
john Peter mail address
49:15
India salary
49:28
12,000 it's added successfully now the data is added successfully i hope you guys you understood things well we'll
49:36
get in touch with another tutorial thank you hi friends welcome to tutor fun
49:42
channel in our last class we did the registration form in this class I'm going to teach the finding form details
49:50
okay so let's select the uh default package and right click new JFrame form
49:57
otherwise you just select this one registration form copy default package right click paste on it paste refactor
50:04
copy to get the another copy i'm going to create this one find different okay so the same phone I I did
50:12
again only the thing is I I'm going to change it as a find so you have to change it like this
50:19
your question copy this control C copy
50:24
control paste here select this one control C copy paste
50:31
here put it here employee
50:38
ID select this one
50:44
properties background color drop down here font family I'm
50:51
going to give as font I'm going to give as change it as
50:57
uh white go along with white okay
51:03
now let's select this one if I enter the respect employee ID the relevant
51:08
information will be respect so what I'm going to do is here I have to do the things by uh thing do the thing is first
51:16
what you going to do is this form first I'm going to go to this one all the if
51:21
you copy and paste it the connection should be there add button this details we don't need them this I'm not going to
51:27
add the record uh file chooser also we don't need them we not we are not going
51:32
to choose any files over here so this here we have to do only one button that
51:38
is a find button That's fine button this browse button let's get rid
51:44
of this browse button so what I'm going to do is now here this find
51:50
button if I enter the respective employee ID the relevant all the details
51:55
should be display need to display so what I'm going to do is I'm going to go to this registration sorry uh this
52:02
finding details okay so what I'm going to do is I'm going to cool thing is I'm going to go to get this one i'm going to
52:08
explain don't worry this all the source code I provide you don't worry so this find button you have to paste on the
52:16
code so I'm going to go to this function I'm going to mod function
52:22
now this one I'm going to remove this one so we have write here
52:29
system dot dot
52:42
print this X this one select this one put it over here
52:48
x so here what I'm going to see I'm trying to select the things is this RS
52:53
so that I haven't put this name spaces so here I'm going to go to this
52:59
one i'm going to this RS in this uh
53:05
RS put this RS here so here what I'm going to do is here I'm going to go to
53:10
do the thing is so we have to implement the RS details so the error will be go away so here this one uh we have to take
53:18
care of the text fields and all so this a text ID this one should be txt
53:28
id enter the txt id so the database name which is a uh
53:35
what's the name you have entered here sorry database name
53:41
uh I'm going to give the registration part what's the name of the database
53:48
registration registration uh what other fields are there at registration these are the fields I just
53:54
copy this finding also you have to give this field same field okay so same field you have to
54:00
give it the here
54:07
finding okay the registration part we need all the things you have a ID just
54:13
so that your ID we with the file IQ ID so here when the venue ID is this one
54:19
should be RB mail this one should be RB
54:27
female copy and paste that's it now let's first I'm going to uh combo box
54:34
also we have display the combo box whatever name we have given here c this work first we have I'm going to first
54:40
you have to check that it's working fine or not after that I'm going to explain and run
54:46
it this all the source code we have done the project this source code what I provided the description okay you will
54:51
be able to read it so this one I'm going to run on it
54:57
uh we have this the registration also there
55:02
the so here we have
55:09
to so what I'm going to say this one I want to run this project so why it's not
55:16
running if I run this one should be running not that run so I'm going to put it additional
55:22
frame main this frame what I'm going to do is
55:29
I'm going to go to put this
55:39
buttons this one should be main this one should be
55:46
fine second but I'm going C copy this free V to paste here this one should
55:54
be leg
56:05
station select this one called properties codes center
56:13
this one I'm event action action perform write it over
56:20
here registration if equal
56:29
new registration
56:37
uh this is the form this page
56:53
station copy test
57:00
dot
57:12
set copy this this one you press second button
57:25
that's what I got just
57:34
fine now I'm going to use it this one now if you click find button it goes to
57:40
the respective form i'm going to find the respective employee ID so why it's not
57:47
working is there any error uh the error is that uh this
57:55
uh failure that the driver not receive any package uh
58:03
because okay I'm I'm not running the server that's
58:09
all now let's do
58:14
it run the project find
58:21
one two is not working so I'm going to try
58:26
it or not uh so let's select the database go through the database and
58:33
check whether it's working better or not
58:49
if I enter the database here we have only one record left okay so one if I
58:54
press one here no one not display the details over here the basic salary is
58:59
not found the error is coming so that what's the error but let's check
59:06
it the basic Yeah yeah okay the error mean the field is not correct that's the
59:12
things first name first name the address is last
59:21
name the data is coming you have to uh put as the same thing uh that's the
59:27
problem okay so the problem is here is my my fault first
59:33
name second last name
59:42
gender address
59:48
department salary image bar so here also you have
59:54
write it here first name last name salary mean the
59:59
salary everything is correct but I don't know what what it is for department let's check it
1:00:15
again one again the path the path is the
1:00:21
problem it's saying the path problem uh what's the path the path no here I'm not
1:00:27
a photo this is a photo not path photo okay so the database feed I have a
1:00:33
uh mistake with the database that's the problem okay so if I write one it's
1:00:39
okay detail okay so what I did here is
1:00:46
for you can see what is the ID you enter on this text box click find button this
1:00:53
ID will be assigned to this ID variable okay this textbox name is txt ID it will
1:01:01
be assigned to this variable After that PST the prepare statement object you have written here PST in
1:01:08
order to write the query select this is the query you have to select the record
1:01:14
why the using the ID what's ID you are typing based on the ID the uh display
1:01:20
the record so if you type ID one what happen is it goes to here this select as
1:01:25
a parameter over here if there if the record is there if next true if the
1:01:30
record is Yeah so here we have to get all the records into the retrieve the data records into the
1:01:38
database column first name last name gender department salary everything into this column it assigned to the
1:01:43
respective variables okay so this one should be the radio button radio button when the
1:01:49
record is coming male it select radio button select as male if the record is coming female this record is select as
1:01:57
male the radio button will be displayed upon on the
1:02:04
uh request if it is male if you have selected male male will be display if this female female will be it is decided
1:02:10
based based on the database which you are saved you are male or female okay this is the image part where your image
1:02:16
is resided in your project my images reside in your project in my project folder there is inside the folder there
1:02:23
is a another package images inside the images we have all the images respect images there so after that what I did
1:02:30
here is we have all things we are getting from the database and assigned to this variables okay this all the
1:02:36
column names you are putting here this column name we are retrieving the data what's the ID you are typing in the
1:02:42
column name you are retrieving the data and assigned to the particular variables now the data is there in the this
1:02:48
variable this variable data we are passing to the respective fields okay so they are respective fields the data will
1:02:55
be passing the respective field if it is a name this field gender main is gender
1:03:00
selected gender these all the things pass okay so here you can see this is
1:03:06
the gender option so gender option selected first you confirm you
1:03:12
selected okay this can now I'm going to run the project
1:03:20
again click fine one click on this here it's selected
1:03:25
successful okay perfect we you did the uh job perfect thank you for watching if
1:03:31
you have any doubt you can let me know that thank you for watching
#Java (Programming Language)
#Programming