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

Discussion in 'Java' started by Roedy Green, Aug 1, 2003.

  1. Roedy Green

    Roedy Green Guest

    On 1 Aug 2003 07:49:13 -0700, (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.
     
    Roedy Green, Aug 1, 2003
    #1
    1. Advertising

  2. Roedy Green

    stefan s. Guest

    Roedy Green <> wrote in message news:<>...
    > On 1 Aug 2003 07:49:13 -0700, (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
     
    stefan s., Aug 2, 2003
    #2
    1. Advertising

  3. Roedy Green

    Roedy Green Guest

    On 2 Aug 2003 04:07:41 -0700, (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.
     
    Roedy Green, Aug 4, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. LarsR

    News Ticker

    LarsR, Jul 29, 2004, in forum: Java
    Replies:
    0
    Views:
    515
    LarsR
    Jul 29, 2004
  2. ©®

    Scrolling news ticker

    ©®, Nov 18, 2003, in forum: HTML
    Replies:
    8
    Views:
    10,933
    Safalra
    Nov 19, 2003
  3. adam bob

    News Ticker

    adam bob, Oct 8, 2007, in forum: XML
    Replies:
    2
    Views:
    1,015
    adam bob
    Oct 9, 2007
  4. Replies:
    0
    Views:
    323
  5. Knut Krueger
    Replies:
    8
    Views:
    294
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page