🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: cn.bbs.comp.program
1 messages
1 total messages Started by �ڰ�֮�� Sat, 20 Dec 1997 00:00
Java Q&A (GB��) (��)
#2489
Author: �ڰ�֮��
Date: Sat, 20 Dec 1997 00:00
413 lines
10551 bytes
JAVA Q&A���ļ�

�����ϲ���Ӵ................. 




��һ�ʡ�



> 1)�Ǹ� LEDSign V2.7 ���Զ�����������??

> 

> 2)���͵�(*.font)�Ľṹ,��û����λǰ�����Խ̽�����??

> 

> 3)������Ƶ�(*.led)�Ľṹ,Ҳ�̽�С�ܺ���??

*����Լ�����������ʾ����,��������*.font����,д����Ҫ���ֵ�(*),

��font��ֻҪtryһ�¾Ϳ���,*.led�������ֵ��Կ���,���Ų��þ���

�˽�.

*�Ӿɰ��һֱ���Ե�, ���Բο� http://esunbank.com.tw 

*����һ��LED-SIGN��ʹ����

˵һЩ�ҵľ���

��������һ��

�ǿ��Ե�

ֻҪȥnctuccca.edu.tw /Chinese/ifcss/software/dos/banner��

��FTPץ cbanner.exe ��һ������

����һ�������Ļ��������ֱ����'"��ɵĴ�����....

��WIN95�е�ʹ�ð취��

��Ҫ��ET�ȵ��������γ�ʽ

����DOS��ִ��ET

�ټ���cbanner -p ���а�װ��Ҫ�����ͣ������塡����........��

��WIN95��ִ��cbanner�Ϳ��Կ�����������

������������Ե�"��ʾ"��.�Ϳ��Խ��������ͼ�������

--

�ٵ�http://www.cs.ccu.edu.tw/~sjs84/cled.html#modify��

 ץ�޸Ĺ��class(Download)��font(cfont��cfont24)�����demo.led

�Ա༭HTML������༭

���Խ��Ըղŷ�ʽץ�ı�����μ���cfont.font��

 ����˵���ɡ�










�ڶ��ʡ�



>    �й�action���method������true&false�Ĵ���ֵ��?

>    ��֪����û�����з����������ȥӦ���⴫��ֵ...

>    Ҳ���dz�ʽ�������֪��action��ִ���ˣ���Ȼ��ij��button�����ˡ�������..)

>    Ȼ���ڼ����ж������Dz�����Ҫ��,��֪������жϵij�ʽ��Ҫ�����ı߲ź�..

>

>    if(action(Event evt,Object obj) == true) {

>        ...........

>    }

>    else 

>        ...........

       һ����ʽƬ������ο� :



       public boolean action(Event evt, Object what)   {

           if (evt.target instanceof Button){

              // ֻ���� Button ������ action, ����IJ���

              ....................

               return true;

           }

           else

               return false;

       }



:     ���������action method�Ĵ���ֵҪ����ȥ�����ء�

:     ��Ϊֻ�е����ǰ���Button��ʱ��action�Żᴦ������¼���Ȼ���ڴ���

:     true or false,������Ҫ����ץס���ʱ���������ֵ���������ء�

:     ���������������⡡



��ʵ������뷨����Щ����...

����Ҫ��һ��, ��������ֻҪ�� action method �Ĵ���ֵ,

������ϵͳ���õľͺ���. :)

�������ǡ�д��action ��ϵͳ call ����, ����ֻҪ��

                          ^^^^^^^^^^^^^^^^^^^^

(Ӧ����˵ "Override" action ��� method ��������..)

return true;  �� return false; ������ϵͳ����� action method ��,

������û��ȥ������¼�����.



>     ���������action method�Ĵ���ֵҪ����ȥ�����ء�

>     ��Ϊֻ�е����ǰ���Button��ʱ��action�Żᴦ������¼���Ȼ���ڴ���

>     true or false,������Ҫ����ץס���ʱ���������ֵ���������ء�

>     ���������������⡡



        �㲻��ȥ����� return value, �Ҿٸ������, ������� container ��

        �� add  һ�� button �԰�? ���� mouse �Ƶ���� button ����, ����

        �� button ���յ� mouse enter event ? ���ǵ��µ� container ���յ�

        ��� event ?  ��ʱ button �����յ�, ����� handleEvent �Ĵ���ֵ

        �� false, ��� button û��ȥ������� event, ��ʱ����ѹ�ڵ��µĶ�

        �� (�������� container) �� handleEvent �Ϳ����յ���� event ...

        ���� true �Ļ�, ��� event �Ͳ���������´���. �㲻�ùܱ��˴���

        true or false, ��ֻ���Լ�Ҫ���� true or false �ͺ���










�����ʡ�



:    ������û����֪�����ʹ�� java �� ftp ijһ��������?

:    ���� xxx = new URL("ftp://�������/�������");

:    ��ִ��ʱ������� unknown protocol : ftp

�� Java ����һ�� class ��ֱ���� ftp �Ĺ���

���ǵ�û��Ļ�, ������ java.net ������ sun.net ��

��鿴 tutorial or book �Ϳ����ҵ���, �� Java! ��

����һ�� 20 ���е� ftp �����ʽ�












�����ʡ�



:                 static���method modifier����ʲ���õ���

:                 СС����..лл��Ļش��!!! :))



        ��. ����ı���򷽷�.

        ����� class variable(method)

        ���� java.Math.* �� method ���� static ��.

        �Ͳ���Ҫ����һ�� java.Math �� instance.

        ����ֱ���� java.Math.sin(...) ����.










�����ʡ�



 

>������ν����ֵ�string תΪ int

String s="123";

int num;



num = Integer.parseInt(s);








 

�����ʡ� 



>     ��ץ��JDBC�������⿪֮�ᡡ����JAVAC ʱ��ȴ�������Ҳ��� SQL ��CLASS

>     ����������֡���̫֪����COMPILER���ȥ������Ҫ��PACKAGE.

>     ����IMPORT JAVA.SQL ���Ǿ����Ҳ���??��֪���Dz���Ŀ¼������??

>     ��û�п��Ը�����??лл!!



����⿪��,�����һ�� jdbc ��Ŀ¼,

���� SQL �� CLASS ����� jdbc\classes\java\sql ��.



����� autoexec.bat �ڼ����е�����:

set CLASSPATH=d:\jdbc\classes;

Ȼ������ִ��autoexec.bat,����Ϳ�����.

�м�ǧ��Ҫ�� sql ��Ŀ¼�ᵽ java\lib\java ��.

����������������ҿ�һ���µ�ʱ�� :~~(

�������ع� win95 ��OK...



> JDBC���кι���?FTP������? ����Ϊ��?

JDBC ���� Java DataBase Connectivity ����д.

��ʹ Java applet (application) �������Թ���ʽ���Ͽ�������.

����http://java.sum.com��.










�����ʡ�



> public class MyStandAlone {

>         public static void main(String args[]) {

>                 System.out.println("Hello World!");

>         }

> }

> #�����ҵ� MyStandAlone.java ��!  �� javac compile �� .class ��!

> 

> #�����ҵ� MyStandAlone.html ��

> #֮���� appletviewer MystandAlone.html ��!  �� appletviewer �ϳ���

>         start: applet not initialized

> ����ɶԭ����!??

����, ��д�ij�ʽ�ֲ��� Java Applet , ��Ȼû�а취�� appletviewer ����,

ֱ���� c:\>java MyStandAlone

�Ϳ��Կ��������ϳ���һ�� Hello World! ����,



>         ����β����� appletviewer �Ͽ��� Hello World! ��?

>         Ҫ������ѽ??  :)

����� class MyStandAlone ���� �̳� applet

���ұ��밴�� applet �Ĺ����д��ʽ, ��ȻҲ������

System.out.println , ��������û�ͼ,

���� showStatus ������ִ��� applet .

������ʹ�û�ͼ�ķ���:

--------------

import java.applet.*;

import java.awt.*;



public class MyStandAlone extends Applet

 {

  public void paint(Graphics g)

  {

   g.drawString("Hello World",25,50);

  }

 }



���ϵķ���, ���� Applet �е� (25,50) λ�û����ִ� Hello World .



�������ϵ� Applet ����Ӧ���ⲿ�ݻ�����˵������.






            ����������������? �����κν��顡��д���Ÿ����ǰ�!! С���ᾡ�������ܵ��ġ�

                        Copyright (c) 1996 BluesTown Music & Internet Centre. 
                           Last modified: Wednesday, August 07 1996 01:55 

--

�� ��Դ:���ɰ��ļ�BBSվ bbs.njtu.edu.cn��[IP: 202.112.145.26]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads