程序代碼:
import java
import
import java
public class searchengine extends Applet
{
TextField keyword = new TextField(
Choice EngineName; // 使用的搜索引擎列表
Button go = new Button(
public void init()
{
setBackground(Color
keyword = new TextField(
EngineName = new Choice();
EngineName
EngineName
EngineName
EngineName
EngineName
add(keyword);
add(EngineName);
add(go);
}
public boolean action(Event e
{
if(e
{
try
{ goSearch(); }
catch (Exception e
{ showStatus(
}
return true;
}
public void goSearch() throws Exception
{
String str = keyword
if(str
{
showStatus(
return;
}
String url =
switch (EngineName
{
case
url =
break;
case
url =
break;
case
url =
break;
case
url =
}
url += URLEncoder
showStatus(
getAppletContext()
showStatus(
}
}
From:http://tw.wingwit.com/Article/program/Java/Javascript/201311/25280.html