按钮的响应代码可以参考下面:public boolean action(Event event, Object o)
{
AppletContext ac;
URL url;
try{
url=new URL("http://127.0.0.1");
if(event.target instanceof Button)
{
ac=getAppletContext();
ac.showDocument(url,"_blank");
}
}catch(MalformedURLException e){
return true; }
return true;
}
{
AppletContext ac;
URL url;
try{
url=new URL("http://127.0.0.1");
if(event.target instanceof Button)
{
ac=getAppletContext();
ac.showDocument(url,"_blank");
}
}catch(MalformedURLException e){
return true; }
return true;
}
解决方案 »
- ubuntu12.04下安装jdk
- 抽象类继承实类
- 写一个java程序,实现对一个二维数组按指定的列集进行排序?要求实现类似sql中order by的功能,移动时,整行移动,不能打乱整行顺序。
- 关于DataInputStream与IntputStream的问题
- java.io.File.pathSeparator为啥是分号?
- java聊天程序?
- 如何注意大小写问题
- 我想设置一个有立体感的按钮。
- 一个问题,各抒己见
- 小弟的一个小问题~~~
- 在java applete中如何与SQL SERVER数据库连接,并读取数据
- 怎么能用java applet 弹出Outlook,并把文本框中的内容带到Outlook
getAppletContext().showDocument(URL,String)
String ------"-blank","-self",("-parent"(sorry, forget))