• 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 Scrolling Applet Using Arrays Help please

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For my computer science course we have to incorperate an array into an applet to make five line scroll in a certain order. i have started but have no idea where to go from there. would really appreciate help.



and this is my html file



any ideas would be great
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I'd say from here, you need to make the lines scroll in a certain order.

In all seriousness, you'll find you get better help if you ask a more specific question. What EXACTLY are you stuck on?

putting them into an array?
displaying them?
displaying them in a specific order?
getting them to scroll?
compiling your code?

Each of these questions would have to go down a different road, and may lead to more questions. Without knowing where you are really stuck, most people aren't going to bother helping you since they would probably just be wasting their time answering the 'wrong' question.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The array requirement might be satisfied by having something like this:

The scrolling part could be addresses by having 5 threads that scroll each line independently of all other lines (assuming that you have covered multi-threading; if not, that part could also work sequentially).
 
fred rosenberger
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ulf, it sounds like you are thinking that each line should scroll across.

I interpreted the assignment as the 5 lines should scroll like on an ancient terminal - i.e. a new line scrolls up, replacing the previous one.

Which, again, is why we need more specific guidelines from the OP.
 
Ben Peer
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is what's required

Use arrays to create an applet that lists five of your favorite songs. The applet should:
• scroll the list of song titles, one at a time
• each song title should start at the top of the applet and scroll to the middle then, scroll off the right hand side
• each new song title should scroll in a different colour
• the applet should loop, that is, when it gets to the end of the list, start over again at the beginning of the list
*The last step is the most difficult one. This step is not a matter of Java "know-how" but, a matter of being able to reason through the problem of "how to get text to change direction when it hits a certain point on the applet?"


and as for where im stuck is every where i dont know where to start as for what i have i dont even know how i got there..
 
fred rosenberger
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does what you have compile/do you know how to compile it? Does it run/do you know how to run it?

Does any of what you (allegedly) have written make any sense?

The best way to program is to break things down into TEENY TINY steps. Do one step, get it working, and only then move on.

Nobody here is going to write the code for you. We are happy to HELP you, but you have to do the work. Start by telling us what you know, and exactly where you are, and what you're trying to do next.

Simply saying "It doesn't work. I don't know what to do" is not going to get you any help at all around here.
 
Marshal
Posts: 79179
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try scrolling everything, but forget the colours and things. Make it simple, then (to add to what Fred says) it will be easier, and you can add other features and enhancements later.

You realise there are classes usually used in applets which support scrolling automatically?
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, I think I must be in the same online course as Ben Peer. I am on the same assignment.
Just to let you guys know, what we learn in our Content is always completely different than the assignments they ask us to do, thats why its so hard.

Anyways, I have no idea where I'm even going to start with this assignment, but.. I'm sure I will need help and this seems like the appropriate thread, so when I do guess I'll post here :p
 
reply
    Bookmark Topic Watch Topic
  • New Topic