Results 1 to 5 of 5
  1. #1
    sarahaggos is offline Member
    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0

    Default JList in NetBeans 7.0

    Hi,
    Im new in using java ,i hope u will help me to solve my problem.
    Im using JList in my JFrame, what i want to do is when i click item 1 in the JList it will change the image in a label i post it beside the JList , every time i click differant item should select another image,
    what i did is
    in the label properaties i select the icon and i upload some images after that i set the label
    isVisable(false);
    whenever i select the item from the JList it will make the label visable , maybe my way is wrong
    Could u please help me to that in a correct way

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default

    Read the API for JList and follow the link to the Swing tutorial on How to Use Lists. Also go through the other sections of that tutorial.e.g. How to Use Icons.

    Apart from that, to get better help sooner, you can post a SSCCE that clearly demonstrates your problem. Note that the first S stands for Short, and that ugly IDE-generated code isn't likely to get many helpful responses.

    db

  3. #3
    sarahaggos is offline Member
    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0

    Default

    Thank you for your replay..
    But sorry i didnt understand what you mean about API ..
    Thanks again and sorry for disturbing you

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default

    Java SE 6 API

    Bookmark it. You'll need it often.

    db

  5. #5
    sarahaggos is offline Member
    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0

Similar Threads

  1. Adding to JList with Netbeans
    By kewlgeye in forum NetBeans
    Replies: 7
    Last Post: 03-28-2012, 07:39 PM
  2. Populating a JList from a text file - Netbeans
    By Ben1 in forum AWT / Swing
    Replies: 1
    Last Post: 01-13-2011, 03:30 PM
  3. Link one JList to another JList
    By mib1bee in forum AWT / Swing
    Replies: 1
    Last Post: 12-31-2010, 07:10 PM
  4. Link one JList to another JList
    By mib1bee in forum Advanced Java
    Replies: 1
    Last Post: 12-30-2010, 06:35 PM
  5. Link one JList to another JList
    By mib1bee in forum New To Java
    Replies: 1
    Last Post: 12-30-2010, 06:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •