hi friends welcome to tutors funny channel today I'm going to show you how
to make the IP address find system using Java let I show the demo first right
click run file the simple system here you can check here if you click ok
button here this is the IP address of your machine you easily identify here if
you go to the command prompt IP config if you type IP config this is the IP
address this is the code part right this is this is essential stuff in Java you
identify the machine configuration to say when you are create when you are
creating the network system this must this one should be must right so let me
see how to do this is some step by step let's go to the file new new project
Java application sorry file new project Java application click next if it is
check create main class you have to uncheck it here I am going to create this one IP address right IP address example example click finish your
project has been created successfully IP address ex now here first what I am
going to do is select the source packages right click new J frame form
here I am going to create the project name is IP address right simple here I
have drag one label here but I am going to select this one first go to the
source control F fine UI your type UI UI press enter key you can check here this
is the we are change as metal this is the actual Java user interface right
right now here when you run the application you can check here what
happen this is actual Java here it's actual Java now here first what I am
going to do is here I am going to make the code right so select this one IP
address fine IP address fine right like this one right click properties you have
to make this one bold 24 click ok right this is the stuff you have to do now
here I need one button so let's go to the palette drag one button right now
here this one I am going to select this one fine button we have to make it as
fine when you click this button our IP address will be pop up right so how to
do the task here is select this application right click properties code
we are generate center so that the output should be generated at center here
right click run file you can check here okay here when you click the fine button
the IP address should be pop up right so double click on the fine button now you
have to write the code over here first step what I am going to do here is we
have to write here we have to add the relevant classes over here so go to the
here you have to declare the classes above the class in this one you have to
add the namespaces you have to write import java dotnet this is the network
you have to access the class also not net all network classes we have to put
like this okay this is a network you have to write you have to import this namespace after that here we have to write the code for that net address you
have to create the object address equal this one ctrl c to copy ctrl v to paste
dot get lost get localhost this one get localhost right after that here this one
you have to add surrounding the catch try and catch block after that we have
to write here is string address host equal you have to write this one this
address ctrl c to copy ctrl v dot get host address this one you have to write
here we have to this one this all the network address you are getting and pop
the message box so you have to write j option pan dot show message dialog you
write here this this one ctrl c to copy ctrl v to paste here right now let's run and
check here it's working perfectly well this is the current machine address very
nice I hope you guys you understood this program well if you have any doubt on
this you can ask me anytime thank you for watching