1. Trang chủ
  2. » Công Nghệ Thông Tin

300 Java tips phần 1 ppsx

17 157 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 17
Dung lượng 0,96 MB

Nội dung

Start Here! file:///C|/330_new/330_new/first_page.htm [2003-07-22 22:07:44] [...]... file:///C|/330_new/330_new/code_examples.htm (12 of 12 ) [2003-07-22 22:07:46] Applets Receive our newsletter with new tips! More than 13 ,500 subscribers (by July 2003) can not be wrong! They read our tips every week! To subscribe to "The Java FAQ Daily Tips" weekly edition newsletter send email with "subscribe" word in the header and the body (write just subscribe without ""!!!) to: javafaqtips-request@javafaq.nu or on the web: http://www.javafaq.nu/plm2html/my_subscription.shtml... file:///C|/330_new/330_new/applets.htm (1 of 13 ) [2003-07-22 22:07:47] Applets String ss = System.getProperty(String key): java. version java. vendor java. vendor.url java. class.version os.name os.arch os.version file.separator path.separator line.separator Applets are prevented from reading these system properties: java. home java. class.path user.name user.home user.dir source: http:/ /java. sun.com/sfaq/ -AP (J.A.)... System.currentTimeMills(); Give the rest to you Garbage Collector! file:///C|/330_new/330_new/code_examples.htm (11 of 12 ) [2003-07-22 22:07:46] Code Examples -Andrey S P.S This advice was sent directly to us, to info@javafaq.nu Have you such? Please send! (c )19 99, 2000, 20 01, 2002, 2003 JavaFAQ.nu All rights reserved worldwide This document can not be changed, either in whole or in part without the... software to use applets? Answer: No Java applets may be served by any HTTP server On the server side they are handled the same as any other file, such as a text, image, or sound file All the special action happens when the applet class files are interpreted on the client side by a Java technologyenabled browser, such as HotJava browser or 1. x or Netscape 3.x/4.x source: http:/ /java. sun.com/products/jdk/faq.html#A8... process (java. io.Reader reader) I usually call this with a java. io.FileReader, to process files from local disk Like this: file:///C|/330_new/330_new/code_examples.htm (9 of 12 ) [2003-07-22 22:07:46] Code Examples Element root = null; FileReader fr = new FileReader("config.xml"); root = process(fr); Now, I need to process a file residing on a Http-server, and I have a reference to this file in a java. net.URL... draw empty rectangle (you see I save your inks!) import java. awt.*; public class print { public static void main(String args[]){ Frame frm = new Frame("JavaFAQ_test"); frm.pack(); PrintJob printJob = frm.getToolkit().getPrintJob(frm, "print", null); if (printJob != null) { Graphics grphcs = printJob.getGraphics(); grphcs.drawRect(50, 50, 15 0, 10 0); grphcs.dispose(); printJob.end(); } System.exit(0);... (IOException e) { } file:///C|/330_new/330_new/code_examples.htm (10 of 12 ) [2003-07-22 22:07:46] Code Examples if (c

Ngày đăng: 05/08/2014, 09:45

w