Guys Help me with this Application(when you put the name of the website it will return the IP of the web)

Guys Help me with this Application(when you put the name of the website it will return the IP of the web)

import java.awt.*;

import java.awt.event.*;

import java.net.*;

import java.io.*;

        public class MyApp extends Frame implements ActionListener {

            TextField url;

            Button ok;

            MyApp(){

                Label urlp=new Label("URL: ",Label.RIGHT);

                ok=new Button("Get IP");                    

                url=new TextField(30);

                add(urlp);

                add(url);

                add(ok);

                url.addActionListener(this);

                ok.addActionListener(this);

                setLocation(200,200);

                setLayout(new FlowLayout());

                setSize(500,500);

                setVisible(true);

                setResizable(false);

                addWindowListener(new WindowAdapter(){

                public void windowClosing(WindowEvent we){

                System.exit(0);

                    }                           

                    });

                }

            public void paint(Graphics g){

                g.drawString( url.getText(),105,105);

                            }

            public void actionPerformed(ActionEvent e){

                    repaint();

                    }



            public static void main(String args[])throws UnknownHostException,MalformedURLException{

            new MyApp();

            InetAddress ip=InetAddress.getLocalHost();

            System.out.println(ip);

            InetAddress SW[]=InetAddress.getAllByName("www.google.com");

            for(int i=0;i<SW.length;i++)

            System.out.println(SW[i]);



                            }

                                }
View Answers









Related Tutorials/Questions & Answers:
Guys Help me with this Application(when you put the name of the website it will return the IP of the web)
Guys Help me with this Application(when you put the name of the website it will return the IP of the web)  import java.awt.*; import java.awt.event....: ",Label.RIGHT); ok=new Button("Get IP
Guys Help me with this Application(when you put the name of the website it will return the IP of the web)
Guys Help me with this Application(when you put the name of the website it will return the IP of the web)  import java.awt.*; import java.awt.event....: ",Label.RIGHT); ok=new Button("Get IP
Advertisements
guys,, need help,, in java programing,, arrays
guys,, need help,, in java programing,, arrays  create a program where you will input 10 numbers and arrange it in ascending way using arrays
would you please help me?
would you please help me?  Write a class Amount which stores sums of money given in pounds and pence. Your con- structor should take two ints, for pounds and pence seperately. The class should also provide methods to add
Can you help me with applet?
Can you help me with applet?  I'm very new to applet, and i'm weak in graphic design part. How can i add the graphic in my test project? Can you help me with this: import java.io.*; import java.util.*; import javax.swing.
Hii i want a JMS application can anybody help me
Hii i want a JMS application can anybody help me  jms application
help me
help me  hi sir pls tell me how to use ajax form validatin from very simple way with two ot three text field pls help me use ajax in php my email id is:- [email protected] pls sir give me some vasic information i know
Intranet Website creation - plz help me
Intranet Website creation - plz help me   hi.. I have assign with the intranet website creation work..right from scratch to end..And honestly I know nothing about it.My domain is totally different .. can anybody pls help me
help me
help me  i have done as u directed but nothing happens gud to me..... . i am using netbeans is that matter at all help me and take me out from trouble where to store jfree api to use it for j2ee based project
help me
button, and nationality I'm using dropdown list. Please help me. your kindness...help me  Hi I'm loges. I'm doing my final year project now, I have some problem in my project and i need some help on it. NowI'm doing a site
help me
help me  HI. Please help me for doing project. i want to send control from one jsp page to 2 jsp pages... is it possible? if possible how to do
help me
help me  please send me the java code to count the number of similar words in given string and replace that word with new one
help me
help me  MY GLASSFISH SERVER NOT START PROPERLY help me warning shows DPL5404:Specification-Version for the optional package [ GNUJAXP ] in the jarfile [ C:\Program Files\Java\jdk1.7.0_02\jre\lib\ext\gnujaxp.jar
help me...
help me...  there is the picture given - cat - dog - rabbit - mouse a. create a class name b. create its attributes (at least 3 attributes) : species, size, leg c. create its methods ( at least 3 methods) : walk, eat, sleep
help me..
help me..   what are the component needed by grid computing, cloud computing and ubiquitous computing? discuss about the security of above computing. difference between that 3 computing
help me...
help me...  Write a program that inputs four words and them displays all possible permutations of the words. So, for example, if the words mad, dog, bites and man are entered, then the following are output : man bites mad dog
help me..
help me..  Write a program that inputs four words and them displays all possible permutations of the words. So, for example, if the words mad, dog, bites and man are entered, then the following are output : man bites mad dog mad
help me..
help me..  Design and write a class named Person and its two.... A person has a name, address, phone number and email address. A student has...) to display the class name and the person?s name. Also define a suitable
help me
help me... class.Several lines of customer should be displayed. you can add a new customer by pressing a key. you will need to determine how the customer will decide which line
help me
help me  Create a GUI application that allows a user to select a text...) count and display the number of words in the file (Hint: You can use.... (Hint: you can use the static methods of Character class ΓΆβ?¬β?? isDigit
Help me
Help me  Hi, LWUIT is working in eclipse j2me for Symbian OS
help me
the order, Fourth button is Find length of text. and there are panels. Please help me...help me  Dear sir/medam i would like to know how to use the java string class method my programm have four button,(enter the text) that first
help me
help me  how to print from a-z, A-Z with exact order using for loop? Thanks for all concern
Help Me
Help Me  What is the source code for Sample example for Mortgage Calculator in J2ME language for developing Symbian
Help me
Help me  plz i want code of program to add real numbers and magic numbers in java example this input :- 5+3i-2+3i output:- 3+6i
help me
help me  pls... xplain dis code:- function go() { window.location.replace("logout.jsp",'window','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1'); self.close
Help me
) { e.printStackTrace(); } } } 4)web.xml: Put the following inside web-app tag: <...Help me  HI I am using Tomcat6.0 this is the problem i got wen i run.../html&amp;quot;); PrintWriter out=response.getWriter(); String name
Help me
Help me  hello!!!!. i have a Excel file which includes 4 columns and somewhat 8500 rows.these rows i have printed in SQL thru Excel file and i have 1 MYSql database which includes all those 4 fields i have defined in excel file
help me
help me  I have a quastion a bout array whic is>>> 1-write aprogram to diplay a multiplication table for 1to 10 by entering the start number and the end number. EXAMPLE: ENTER START NUMBER:1 ENTER END NUMBER:3
Help me
Help me  HI I am using Tomcat6.0 this is the problem i got wen i run... name=request.getParameter("name"); String pass=request.getParameter...("Invalid User name OR passowrds"); out.println("&lt;/body&gt
help me - Java Beginners
help me  helo guys can you share me a code about Currency Conversion.Money will convert according to the type of currency.would you help me please... into 2 decimal places sample 1.25) Mexican_________ guys help me..thank
Help me quickly plz??
Help me quickly plz??  Can you help me to write code quickly this code is a java code take input as double and should use command line arguments and enhanced for statement then find the combine of the numbers plz help quickly
Please help me to create this coding for pizza order application using a handheld computer.....
Please help me to create this coding for pizza order application using a handheld computer.....  You work as a programmer for IT-Tech a small... in the kitchen which displays the orders to be cooked. anybody please help me
help me out...!!!!
help me out...!!!!  i have to make a project on console based application in java.. so can anyone guide me with some gd ideas that can be implemented
help me - WebSevices
help me   help me with the principals of designing agood websites and i can start
help me - WebSevices
help me   help me with the principals of designing agood websites and i can start
I am trying to develop a Image Sliding application but unfortunately its not working... Can any one help me in this
I am trying to develop a Image Sliding application but unfortunately its not working... Can any one help me in this  Can Anyone Help Me In This import java.awt.*; import javax.swing.*; import java.awt.event.*; class SlideShow
Help me plzz
project not web project so kindly provide me a help.... It will be good for me if u...Help me plzz  Hello Roseindia.... I need ur help urgently... I am working on a struts but too beginner to work on it..... I need ur help I am
help me to do it in jsp
help me to do it in jsp  if we click on a topic it should direct to another page in separate window i need to create a part of the web page which... to insert and update the topics via admin page. pls help me to do
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger
please help me.
please help me.  Please send me a code of template in opencms and its procedure.so i can implement the code. Thanks trinath
please help me to this problem..
please help me to this problem..  i wrote a program like keyboard and i used [JTextFiled] means that just you can write inside the program (i.e inside the JTextField) but i want to make this program to let me write where i
please help me...
please help me...  write an application that print number in the following order using a FOR-Loop 1 2 3 4 5 2 4 6 8 10 3 6 9 1215 4 8 121620 5 10152025
help me - JSP-Servlet
help me   how to open one compiled html file by clicking one button from jsp
help me to solve this question...
help me to solve this question...  Given below is a class definition... String getTitle() { return title; } public double getPrice() { return... and then create an array name myLibrary of type Book with size n. Using loop, create n
help me to solve this problem..
help me to solve this problem..  Given below is a class definition... String getTitle() { return title; } public double getPrice() { return price... and then create an array name myLibrary of type Book with size n. Using loop, create n
please help me
drop down list should show the list of name in the department that chosen before. This name list should get from the database. Please help me. By the way, I'm...please help me  Dear sir, I have a problem. How to write JSP coding
Help me - Java Beginners
Help me  please help me in writing a program in java "A student has a name,roll no., class, home address, date of birth. First dessigne a suitable...: year/month/days). You will have to define a class for triple

Ads