請問幾個在Applet中處理文字的問題 補充一點:只能用g.drawString()方式顯示文字.... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用javac -encoding GBK your_applet编译。try{ URL u = new URL(getCodeBase()+"index.html");URLConnection connection = u.openConnection();InputStream input = connection.getInputStream();byte[] buff = new byte[input.available()];input.read(buff);txt.setText(new String(buff));}catch(Exception e){System.out.println(e.toString());txt.setText(e.toString());} Java Tutorial中没有Native1.1 将数字、字符串转换成十六进制 执行ant文件时能将参数传入ANT文件中吗? jar中运行结果与jbulider中运行结果不一至,急,帮忙解决 关于java包的问题 dom4j处理xml问题! 请问,jdbc驱动包是不是非要包含在项目里,不包含是不是就没法运行程序 高手请进:我怎么在JAVA中实现域中用户名,密码的认证? 不好意思,第一次接项目,没什么经验,大家帮我看看, Android Get方式 送分啦!为什么我的JAVA程序在命令行上可以运行,但在JB4中不能运行? 一个处理文本的问题。
try
{
URL u = new URL(getCodeBase()+"index.html");
URLConnection connection = u.openConnection();
InputStream input = connection.getInputStream();
byte[] buff = new byte[input.available()];
input.read(buff);
txt.setText(new String(buff));
}
catch(Exception e){System.out.println(e.toString());txt.setText(e.toString());}