• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java swing star wars effect

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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???
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It reads all lines, but it only stores the last one. You probably meant to write "text += s1" in line 51.
 
paul beppe
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok! sorry for my language.....
how do I store all the rows respecting the "\ n"?


 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With the change I mentioned all lines will be stored. What do you mean by "respecting the \n"?
 
paul beppe
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Paddy spent all of his days in the O'Furniture back yard with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic