Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: Want to create a News Ticker Applet but the Label, Text or TextComponent don't move

Reply
Thread Tools

Re: Want to create a News Ticker Applet but the Label, Text or TextComponent don't move

 
 
Roedy Green
Guest
Posts: n/a
 
      08-01-2003
On 1 Aug 2003 07:49:13 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (stefan s.)
wrote or quoted :

>i'm serching for hints to create a moving text grouped in headline and
>text. Actually it doesn't matter. i have no idea how i can get the
>text moving from bottom to top or from left to right. i tried do
>handle this as shown in sourcecode appending. please help a fool
>solving a little problem for professional-applet-programmers. THANX


THe crude way to handle it is to just use drawString. Each time it is
called it moves the text along a notch.

For the ultimate in smooth scrolling, you draw a giant long banner in
volatile ram, then each time just copy the visible portion of it to
the screen. This way you can pan an image just as well as text.

If you need help with this I would be willing to write you such a
display for a small fee.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
 
stefan s.
Guest
Posts: n/a
 
      08-02-2003
Roedy Green <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>. ..
> On 1 Aug 2003 07:49:13 -0700, (E-Mail Removed) (stefan s.)
> wrote or quoted :
>
> >i'm serching for hints to create a moving text grouped in headline and
> >text. Actually it doesn't matter. i have no idea how i can get the
> >text moving from bottom to top or from left to right. i tried do
> >handle this as shown in sourcecode appending. please help a fool
> >solving a little problem for professional-applet-programmers. THANX

>
> THe crude way to handle it is to just use drawString. Each time it is
> called it moves the text along a notch.
>
> For the ultimate in smooth scrolling, you draw a giant long banner in
> volatile ram, then each time just copy the visible portion of it to
> the screen. This way you can pan an image just as well as text.
>
> If you need help with this I would be willing to write you such a
> display for a small fee.



thanx but is it possible with labels too?
another question: can i create strings and use single parts of them on
other way like display one part in Arial bold 12 and other parts in
Courier 12? thanx for answering!
regards stefan
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      08-04-2003
On 2 Aug 2003 04:07:41 -0700, (E-Mail Removed) (stefan s.)
wrote or quoted :

>thanx but is it possible with labels too?
>another question: can i create strings and use single parts of them on
>other way like display one part in Arial bold 12 and other parts in
>Courier 12? thanx for answering!
>regards stefan


You paint onto a Canvas with drawImage, drawString etc. It can look
however you want. You create a long thin image, then just display a
slice of it each beat of the timer.


So this mean you can have different colours of background, different
fonts. To do animations you have to paint to your giant image just
before copying to the screen.


To get fancy you tack more on the end of the image as you go, and
eventually wrap around back to the beginning so you don't overflow
your REGEN buffer. You still keep painting just by copying the needed
slice(s) to the screen with drawImage.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
News Ticker LarsR Java 0 07-29-2004 08:31 AM
Re: Fox News Ticker and Firefox maxo Firefox 0 06-16-2004 04:06 AM
Scrolling news ticker HTML 8 11-19-2003 10:47 AM
MyYahoo News Ticker anyone??? Jack Slater Computer Support 4 10-23-2003 04:24 AM
News ticker for webpage Steven Pilbeam Computer Support 1 08-07-2003 01:30 PM



Advertisments