Need help with java.awt.List


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Need help with java.awt.List

  1. #1
    Maverick Guest

    Need help with java.awt.List


    Hi. Can anyone help me out with this problem? I'm using the List class from
    java.awt.List and I want to
    know how to write the code that will move the currently viewable area of
    the list to another area.

    For example, in the list there are Line 1, Line 2, Line 3, Line 4, Line 5
    and Line 6. Currently the user
    is able to see the first three lines. What is the method that I can use in
    order to show the fourth item in
    the list without having the user to click down on the scrollbar? (The list
    should now show Lines 2-4).

    Thanks in advance.

  2. #2
    zfq Guest

    Re: Need help with java.awt.List


    "Maverick" <mavx17@icqmail.com> wrote:
    >
    >Hi. Can anyone help me out with this problem? I'm using the List class from
    >java.awt.List and I want to
    >know how to write the code that will move the currently viewable area of
    >the list to another area.
    >
    >For example, in the list there are Line 1, Line 2, Line 3, Line 4, Line

    5
    >and Line 6. Currently the user
    >is able to see the first three lines. What is the method that I can use

    in
    >order to show the fourth item in
    >the list without having the user to click down on the scrollbar? (The list
    >should now show Lines 2-4).
    >
    >Thanks in advance.

    Try List makeVisible(int index) method.


  3. #3
    Maverick Guest

    Re: Need help with java.awt.List


    >"zfq" <zfqjcl@371.net> wrote:
    >Try List makeVisible(int index) method.


    That method will make it visible in the applet, as makeInvisible(int index)
    will make it disappear, but
    still not autoscroll to the one that I wish to show.

    Doesn't matter, I had to create a custom list that also allow different colours
    to be used in different
    sections of the list, instead of the single one colour that java.awt.List
    uses throughout the whole list.

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center