Results 1 to 2 of 2
  1. #1
    shinojkk is offline Member
    Join Date
    Jan 2008
    Posts
    2
    Rep Power
    0

    Default Developing HTML Parser in JAVA

    Hai frndz... I wnat to develop a web extractor that an information site in to a document or txt file with proper format... so i face the following problems. plz help me..
    1. javax.swing.text.html.parser Package
    this package provides Parsing functions.. replay with some examples..
    2. How to add userdefined toolbar to FIREFOX or IE so that to run my application?
    3. how to read the HTML source code into a temperory file so that to give as input to the PARSER

    4.How to download images using JAVA

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    9

    Default

    How to download images using Java
    Java Code:
    import java.awt.image.BufferedImage;
    import java.io.*;
    import java.net.URL;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    
    public class DownloadImage {
        public static void main(String[] args) throws IOException {
            String path = "http://www.java-forums.org/images/ca_evo/misc/logo.gif";
            URL url = new URL(path);
            InputStream stream = url.openConnection().getInputStream();
            BufferedImage image = ImageIO.read(stream);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.add(new JLabel(new ImageIcon(image), JLabel.CENTER));
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
        }
    }

Similar Threads

  1. Developing a new game - looking for Java programmers
    By DeadlyAK in forum Jobs Offered
    Replies: 2
    Last Post: 03-27-2012, 12:40 PM
  2. Replies: 2
    Last Post: 03-10-2008, 01:24 PM
  3. Developing simple MP3 player in Java....
    By JavaEmpires in forum New To Java
    Replies: 0
    Last Post: 01-16-2008, 11:22 AM
  4. Java Mozilla Html Parser 0.1.7
    By levent in forum Java Software
    Replies: 0
    Last Post: 07-30-2007, 05:30 PM
  5. Jericho HTML Parser 2.4
    By levent in forum Java Software
    Replies: 0
    Last Post: 05-21-2007, 11:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •