Web Browser


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Web Browser

  1. #1
    Join Date
    Jun 2004
    Posts
    14

    Web Browser

    Hello

    I was just wondering if there was anyone out there that had any code for displaying an internet page in java ... i want to display a certain page on the net on a JPanel or what ever holds web pages. This page wont ever have to be changed so as long as i can retrieve a certain page from a web server on initialisation i wont ever need to change it....

    This is a bit urgent so any help would be greatly appreciated !!!!

    Kemistry

  2. #2
    Join Date
    Feb 2004
    Posts
    541
    If you go to the java webpages they have a tutorial for using sockets. These are what you use for network communications (including the internet), and you can easily use them for accessing files on the internet.

    As for displaying the page you'll need something that understands HTML. There is something in the standard API that can do that, I think its JEditorPane but i'm not 100% sure. It shouldn't be too hard to find. I don't have any actual code, but it shouldn't be too hard to write it yourself after reading the tutorial. Most of it will already be encapsulated in the Sockets classes. You will just need to create one and point it at the right URL.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center