User Profile

Collapse

Profile Sidebar

Collapse
dvjava
dvjava
Last Activity: Jun 3 '09, 02:51 PM
Joined: May 6 '09
Location: Texas, USA
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • dvjava
    started a topic Jlist paint individual item with a click
    in Java

    Jlist paint individual item with a click

    Hi,
    I need to come up with a java program (JList) to monitor products/goods for my operation.
    The program should let me enter products (items) or delete them, one at a time.

    Once entered, a product (item) should be highlighted or painted in “Red” or default color, indicating it needs attention.

    Once I finish considering a product in the list, I would like to toggle that product (item) to change the...
    See more | Go to post

  • Can you be more specific, JosAH?
    I tried the below code borrowed from Hans Muller, Sun java website, and it makes item being toggle only but does not keep 2 items highlighted.


    JList list = new JList(MyArray);
    list.setSelecti onModel(new ToggleSelection Model());

    class ToggleSelection Model extends DefaultListSele ctionModel
    {
    public void setSelectionInt erval(int index0, int index1)...
    See more | Go to post

    Leave a comment:


  • dvjava
    started a topic JList highlighed stay on previously selected item
    in Java

    JList highlighed stay on previously selected item

    Hi,
    I am wondering if there is way to twist JList such that the highlight still remains on previously selected item after other item is selected.
    For example, this list has 4 items: A, B, C, D
    If I select A, A will be highlighted.
    I then select C, C will be highlighted and A still remains highlighted as well.
    I then re-select A again, A now becomes "de-highlighted".

    Thanks in advance,...
    See more | Go to post
No activity results to display
Show More
Working...