Newsgroup: it.comp.java
Titolo: testochescorre







Ciao


 


Avrete sicuramente provato a correre Java 2D
{lo strano è 
che la pagina html non carica niente o forse ci mette troppo tempo
[comunque 
l'ho "corsa" con TextPad che vi consiglio (è un editor di testo che 

contiene le due funzioni di compile e run java, che gestisce le Macro e che 
potrete
trovare in shareware all' 
http://www.textpad.com
 )]}.
Bene, ma se 
provo a compilare un singolo esempio(MixBall) non importa il resto delle 
classi.
Mi conviene aggiungere C:\jdk1.2\demo\jfc\Java2D\demos alla Path ? O 
è meglio
trasferire tutte le classi richieste negli indirizzi della 
path?
Altra domanda da $1.000.000
come si fa a creare un applet con il 
testo che scorre verso l'alto ?
io ho questo esempio, che allego, che 
richiede l'interazione con il privatecon
  ha un listato incomprensibile 
(almeno per me).
Stamattina ho tutto il tempo e guarderò spesso nella 
posta.
Restiamo in contatto
Ciao


GECK...@iol.it


 


Half-baked ideas 
of attack


hit Laurie 
Rimillard's back


A salvo of 
doughnuts was thrown


she bought up 
five or six plots


the place where 
their father rots


now put her box 
next to his


The Mariana 
Trench


Percieved as just 
half an inch


They sink that 
low everyday


Amendments to the 
contract


This Clause just 
might counteract


theforgoingheretofor


how many ounces 
to cut


needed to turn a 
profit


that's elementary 
math


if you like 
shooting up crack


and catching all 
kind of flak


you'll lead an 
interesting life


now safe sex is 
all the rage 


read it on every 
page


buy yourself some 
new balloons


there are  
bags of lettuce to eat


my socks are 
shoes for my feet


hey can you lone 
me a dime


the japs eat tuna 
eyeballs


and play with 
Godzilla dolls


and kick our 
business asses


it's group a 
Streptococcus


on which we need 
to focus


it killed twelve 
limeys this year


'i had a very bad 
day


i blew my family 
away


the neighbors say 
that i'm weird'


that fucking 
toilet won't flush


it's full of 
paper and mush


the plumber's ass 
in his face


too   
bad   about   the   
fire




too    bad   about     
the     fire 




too    bad   about     
the    fire




too    bad   about     
the       fire




too    
bad   about     the     
fire


 


jesus lizard    shot     
1996 Capitol Records



= - charHeight)
   
osg.drawChars(Screen[scrollcount],0,Columns,CursorX,(YLinePos[scrollcount]-offset));
 
  }
 } 
//end
 for
 }
 catch 
(ArrayIndexOutOfBoundsException e){}
g.drawImage(FinalScreen,0,0,this);
} 
// end paint
 
public void FindMaxLength(String Input_String)
{
  st 
= new StringTokenizer(Input_String," ");
  int Lines = 0;
   
while (st.hasMoreTokens()) {
      String nextword = st.nextToken();
      
if (fm.stringWidth(sb.toString() + nextword) <
        (RightMargin - 
LeftMargin)) {
        sb.append(nextword);
        sb.append(' ');
    
  }
      else if (sb.length() == 0) {
         Lines++;
         
if(Lines>MaxLines)
         MaxLines = Lines;
       }
      else 
{
        if (Columns < sb.length())
             Columns = 
sb.length();
        Lines++ ;
        if (Lines > MaxLines)
        
MaxLines = Lines;
        sb = new StringBuffer(nextword + " 
");
      }


 


    } // end While
    if (sb.length() > 0) {
     if 
(Columns < sb.length())
     {
             Columns = sb.length();
  
           Lines++;
             MaxLines = Lines;
 
     
}
    }


 


      sb = new StringBuffer();
      MaxLines++;
  } // 
end find max length


 


/*************************************************/
/* This 
routine is passed a string. It then      */
/* wraps the string by measuring 
the string      */
/* and comparing it to the Display width         */
/* 
This portion is a modified copy of the source */
/* available from 

sunsite.unc.edu
 written by     */
/* Eliotte Rusty Harold 
elh...@susnite.unc.edu
.  */
/* All 
Rights to this routine belong to Elliote. */ 

/*************************************************/


 


public void Process_Line(String Input_String)
{
   st = 
new StringTokenizer(Input_String," ");
   while 
(st.hasMoreTokens()) {
      String nextword = st.nextToken();
      if 
(fm.stringWidth(sb.toString() + nextword) <
        (RightMargin - 
LeftMargin)) {
        sb.append(nextword);
        sb.append(' ');
    
  }
      else if (sb.length() == 0) {
        Typer(nextword); /* catches 
the one word case */
         if(NumLines <MaxLines)
         
NumLines++;
      }
      else {
        Typer(sb.toString());
      
   if(NumLines <MaxLines)
         NumLines++;
        sb = new 
StringBuffer(nextword + " ");
      }


 


    } // end While
    if (sb.length() > 0) {
      
Typer(sb.toString());
       if(NumLines <MaxLines)
       
NumLines++;
    }


 


      sb = new StringBuffer();
  } 


 


/************************************************/
/* This 
is the routine that actually does the   */
/* character insertion task. 
Placing the        */
/* characters in the screen[][] array.          
*/
/************************************************/ 


 


  public void Typer(String InString)
{
      if(Life != 
null)
{
      Xlimit = InString.length() - 1;
 
      
DisplayMessage = InString.toCharArray();
      try
      {
      for 
(NumChars = 0;NumChars<Xlimit;NumChars++)
      {    
           
Screen[NumLines][NumChars] = DisplayMessage[NumChars];
 
      } 
// end For
      }
     catch(ArrayIndexOutOfBoundsException e)
        
 {
         };
 
 
 
} // end 
if !done
} /* end Typer*/


 


public synchronized void update(Graphics g){
       
paint(g);
}//end update
public String getAppletInfo()
{
      return 
"Scroller  version 1.0 written by Bill Boulton";
}


 


/***************************************************************/
/*   
                                                          */
/* The Following 
two routines were "borrowed" from the creator */
/* of Instant 
Java. The site where this and much more code is  */
/* available is 
www.vivids.com
.                                
*/
/* These routines get rid of that pesky image not loaded before*/
/* 
charcters are displayed problem that has plagued me.        */
/* Many thanks 
to the author of this code.                     */
/*                         
                                    
*/
/***************************************************************/
 
/**
     * Begins the preparation (loading) of the image
     * This 
function returns immediately
     * The image is loaded in a thread
     
*
     * @param image the image to prepare
     */
    public void 
prepareImage(Image image) {
        boolean ImagePrepared;
        
ImagePrepared = prepareImage(image, this);
    }      
 public 
synchronized void loadImageAndWait(Image image) {
        int 
checkImageFlags;
        boolean ImagePrepared;


 


        ImagePrepared = prepareImage(image, this);
        
if(ImagePrepared == false) {
            while(((checkImageFlags =
        
            checkImage(image, this)) &
                            
ImageObserver.ALLBITS) == 0) {
                try {
                    
wait(100);
                } catch (InterruptedException e){}
            
}
        }
    }     
} // end scroller
 


 


 


 


E questo è l'HTML


 


 


<APPLET CODE="vscroller.class"
WIDTH=150 
HEIGHT=120><br>
<Param Name=NumberMsg 
Value="4">
<Param Name=Msg0 Value="WELCOME TO 
FREE-APPLETS!!!">
<Param Name=Msg1 Value="Free java applet 
collection by authors from all over the world."> 
<Param Name=Msg2 
Value="Instructions are included.">
<Param Name=Msg3 
Value="Authors receive free advertising of name, applet, e-mail and 
homepage.">


 


<Param Name=Colour Value="black">
<Param 
Name=Bg Value="ffffff">
<param name=Font              
value=helvetica>
<param name=Style             value= 
plain>
<param name=Points            value=14>
<Param 
Name=TimeMs Value=120>
<Param Name=Offset Value=6>


 


You don't have java! Why don't you get: <a 
href="
http://www.microsoft.com/ie
">Microsoft 
Explorer</a>
</APPLET>


 



 :
POSTA SENZA HTML E MIME PLEAZE!!!!!!!!!!!!!!!!!!!!!!!!!!
-- 
 Signed: Paolo"Flag"Pisati            Be-Developer#E-17711
 "Resistence is not futile.Be."       "Death to false metal!!!"