File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes java swing star wars effect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "java swing star wars effect" Watch "java swing star wars effect" New topic
Author

java swing star wars effect

paul beppe
Ranch Hand

Joined: Aug 09, 2012
Posts: 86
hi everybody..

i have create una animation of text...
this animation it's ok only with one string...i want create this effect with one file txt

this is my script...


this code read only last line of my document...why???
where is the error???
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41865
    
  63
It reads all lines, but it only stores the last one. You probably meant to write "text += s1" in line 51.


Ping & DNS - my free Android networking tools app
paul beppe
Ranch Hand

Joined: Aug 09, 2012
Posts: 86
in this way goes all the text but all attacked him ... I would like to go out with \ n as the original text..

how to do???

help me please...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41865
    
  63
Sorry, I don't understand what you're asking; can you rephrase it? What does the code do now, and what would you like it to do instead? TellTheDetails.
paul beppe
Ranch Hand

Joined: Aug 09, 2012
Posts: 86
ok! sorry for my language.....
how do I store all the rows respecting the "\ n"?


Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41865
    
  63
With the change I mentioned all lines will be stored. What do you mean by "respecting the \n"?
paul beppe
Ranch Hand

Joined: Aug 09, 2012
Posts: 86
one example

in my file is write:

1
beppe
paul
12
java
applet

whe run the program the letters out in this way:

1 beppe paul 12 java applet


thi is the problem....
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41865
    
  63
You mean when using drawString? It probably doesn't honor control characters. Why don't you keep the text in a List<String>, and iterate over that when drawing? You'd have to specify x and y coordinates for each line, but you will eventually have to do that anyway (as well as using different font sizes for different lines) if you want to achieve the Star Wars text effect.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java swing star wars effect