Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

Urgent help on  IP Component in Java Swing.

Thread view: 
maadhuu - 11 Apr 2006 07:47 GMT
Hello ,
I need a java class that can act as an IP component ,basically for
entering IP addresses or subnet masks. Can someone help me out ? I need
the source code.

Thanks a lot.
Maadhuu.
sam - 11 Apr 2006 10:45 GMT
Check out the java.net.Inet4Address and InetAddress. Or are u looking
for a Swing component that will store ur data. ???

--
Suman
sam - 11 Apr 2006 10:56 GMT
Well its pretty simple here it goes

class MyIP
{
 String ipAddress,subNetMask;
  public MyIP(String ip,String subnet)
  {
    this.ipAddress=ip;
    this.sunNetMask= subnet;
  }

  //Getters and setters
  public String getIPAddress()
  {
    return ipAddress;
  }

  public String getSubNetMask()
  {
      return sunNetMask;
  }

  public void setIP(String ip)
  {
    this.ipAddress =ip;
  }
  public void setSunNetMask(String subNet)
  {
    this.sunNetMask = subNet;
  }
}

This is a simple holder that will act as a your IP component. But there
are allready classes in .java.net package that you could use check out
that.

Cheers!!!
Suman


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.