How do I take html code and use it in JPanels?
I'm currently working with google maps APIs and I'm trying to take the contents of a webpage and use it in a JPanel for our application. Is there a way that I can grab the source code from that webpage to use in the jpanel so that it displays the same content in that page. Or if not the page source code, then just whatever is displayed on it.
This is a sample of the webpage that I'm trying to use. I'm trying to use this map in a JPanel.
http://www.google.com/apis/maps/documentation/simple.html
- Nate
[534 byte] By [
nsuangpo] at [2007-11-26 8:33:27]

# 1
hey u can read the webpage using this sample code. check it out. it may be useful for you. We have to use URL connection class to read webpage
try
{
/*Proxy p = new Proxy(Proxy.Type.HTTP,new InetSocketAddress("yourproxy", 8080));
URL yahoo = new URL("http://www.melbourne2006.com.au/Schedule+and+Results/Medals");
URLConnection Connection = yahoo.openConnection(p);
BufferedReader in = new BufferedReader(new InputStreamReader(Connection.getInputStream()));*/
Proxy p = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("yourproxy", 8080));
URL yahoo = new URL("http://www.melbourne2006.com.au/Schedule+and+Results/Medals");
URLConnection yc = yahoo.openConnection(p);
BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
String inputLine;
int counter = 1;
BufferedWriter out = new BufferedWriter(new FileWriter("web.txt"));
String temp_token = new String();//stores the first part of the country name