Am I Using ListSelectionListener Right?

It keeps saying "Cannot resolve symbol: symbol class ListSelectionListener". I am doing this just like the examples I've seen, and I've included event package.... Am I doing the syntax wrong?
import java.awt.event.*;
import java.awt.*;     
import javax.swing.*;
public class InsFrame extends JInternalFrame
    static final int xOffset = 40, yOffset = 40;   
    private JList nameList;
    private String stNames[];
public InsFrame() {       
     super(" Insert New Grades ",
              true, //resizable
              true, //closable
              true, //maximizable
              true);//iconifiable
        //...Create the GUI and put it in the window...
        //...Then set the window size or call pack...
        setSize(300,300);        //Set the window's location.
        setLocation(xOffset, yOffset);
        Container content = getContentPane();
        setBackground(Color.white);
        content.setBackground(Color.white);
        content.setLayout(new FlowLayout());       
        stNames = Recieve.sendNames();             
        nameList = new JList (stNames);
        nameList.setVisibleRowCount( 6 );
        nameList.setSelectionMode(
          ListSelectionModel.SINGLE_INTERVAL_SELECTION );
        content.add( new JScrollPane( nameList ) );
        nameList.addListSelectionListener(
            new ListSelectionListener()     // <<< Cannot resolve symbol here
        { //Open Selection Listener
                public void valueChanged( ListSelectionEvent e)
                    // Do stuff here
        } // Close Selection Listener
        ); // End addListSelectionListener

add this to your imports
import javax.swing.event.*;

Similar Messages

  • How to install windows 7 on my macbook pro mid 2009 using usb. right now aim using mavericks 10.9 can any one please help me. I tried to edit plist in boot camp but it went wrong please help me

    how to install windows 7 on my macbook pro mid 2009 using usb. right now iam using mavericks 10.9 can any one please help me. I tried to edit plist in boot camp but it went wrong please help me.
    Iam new to coding. please help me.

    try the solution posted by kunu here and report back
    https://discussions.apple.com/thread/5105056?tstart=0

  • Using the right apple ID and password I can't sign into iMassage? Why

    Using the right apple ID and password with wi-fi I can't sign into iMassage. Why?

    Did you purchase Apple Care? If you did, you still have access to Apple Support.  If not, go to your Apple Store and let them help you get it set up correctly.  I'm sure it's something simple we're missing.  Good Luck. 
    Do remember one thing.  iMessage on iPad only works with other iOS devices.  This means you can only text to people who:
    1.  Have an iPhone, iPad, or iPod Touch
    2.  And they have upgraded to iOS 5 or higher

  • How to forbid the use of right click to open a pop up window  from a link ?

    I would like to prevent the user from opening pop up windows using the right button of the mouse on a link.
    Is it possible ?
    Thank you in advance for any help and suggestion.
    Paolo

    Is this regarding OAF ? if this is a requirement in OAF, then its not possible(unless you put in some javascript function in the page).
    If you want to do it in other jsps there are a lot of examples available in google on how to do this.
    Thanks
    Tapash

  • Query don't use the right index when using bind variables

    Hi people !
    I need some help because I have an issue with a query that don t use the right Indexes as it should
    First of all, I have mainly three tables :
    ORDER : Table that contains description for each Order (approximately 1 000 000 Records)
    ORDER_MVTS : Table that contains the tasks made (called movements) to set up each Orders
    with quantity of packages prepared for each product (approximately 10 000 000 Records)
    PRODUCT : Tables that contains the products (approximately 50 000 Records)
    When I launch the query with hard coded values, it brings back response very fast
    because it uses the right index (ORDER_DHR_VALID) which represent the date and hour of the order
    (with format 'DD/MM/YYYY HH24:MI:SS'). The selectivity for this index is good.
    NB 1: I have to use the trick " >= Trunc(date) and < trunc(date) +1 " to filter on a simple date because
    the index contains hour and minutes (I know it wasn't probably a bright idea at conception time).
    NB 2: The index on ORDER_MVTS.PRODUCT_CODE is'nt discriminating enough because there is'nt enough different products.
    It's the same for index on CUSTOMER_CODE and on MVT_TYPE so only the index on ORDER.DHR_VALID is good.
    Here is the correct explain plan when I execute the query with hard coded values :
    SELECT SUM(ORDER_MVTS.NB_PACKAGE)
    FROM ORDER_MVTS, PRODUCT, ORDER
    WHERE ORDER.DHR_VALID >= TRUNC(to_date('14/11/2008 10:04:56','DD/MM/YYYY HH24:MI:SS'))
    AND ORDER.DHR_VALID < TRUNC(to_date('14/11/2008 10:04:56','DD/MM/YYYY HH24:MI:SS')) + 1
    AND ORDER_MVTS.MVT_TYPE = 'DELIVERY'
    AND PRODUCT.CODE = ORDER_MVTS.PRODUCT_CODE
    AND ORDER_MVTS.ORDER_CODE = ORDER.CODE
    AND ORDER.CUSTOMER_CODE = 'ADIDAS'
    AND PRODUCT.CODE = 1234
    Rows Row Source Operation
    1 SORT AGGREGATE
    2 NESTED LOOPS
    4 NESTED LOOPS
    2 INDEX UNIQUE SCAN (object id 378548) --> PRODUCT_PK
    4 TABLE ACCESS BY INDEX ROWID ORDER
    777 INDEX RANGE SCAN (object id 378119) --> ORDER_DHR_VALID
    2 TABLE ACCESS BY INDEX ROWID ORDER_MVTS
    30 INDEX RANGE SCAN (object id 377784) --> ORDER_MVTS_ORDER_FK
    Now the problem is when the query is used in a Cursor with bind variables.
    It seems like Oracle don't use index on ORDER.DHR_VALID because he can't figure out that he have
    to actually filter on a short period of time (only one day).
    So Oracle uses the index on ORDER_MVTS.PRODUCT_CODE which is'nt a bright idea (it takes 10 secondes instead of just one)
    Here is the bad explain plan :
    Rows Row Source Operation
    1 SORT AGGREGATE
    2 NESTED LOOPS
    722 NESTED LOOPS
    2 INDEX UNIQUE SCAN (object id 378548) --> PRODUCT_PK
    722 TABLE ACCESS BY INDEX ROWID ORDER_MVTS
    1790 INDEX RANGE SCAN (object id 377777) --> ORDER_MVTS_PRODUCT_FK
    2 TABLE ACCESS BY INDEX ROWID ORDER
    1442 INDEX UNIQUE SCAN (object id 378439) --> ORDER_PK
    Now I have found two solutions to this problem :
    1) using a Hint to force the use of index on ORDER.DHR_VALID (with /*+ INDEX(ORDER ORDER_DHR_VALID) */ )
    2) Using Dynamic SQL and keeping the date hard coded (but not the other values except mvt_type)
    For example :
    QUERY :=
    'SELECT SUM(ORDER_MVTS.NB_PACKAGE)
    FROM ORDER_MVTS, PRODUCT, ORDER
    WHERE ORDER.DHR_VALID >= TRUNC(TO_DATE('''||To_char(P_DTE_VAL,'DD/MM/YYYY')||''',''DD/MM/YYYY'')) '||
    AND ORDER.DHR_VALID < TRUNC(TO_DATE('''||To_char(P_DTE_VAL,'DD/MM/YYYY')||''',''DD/MM/YYYY'')) + 1 '||
    AND ORDER_MVTS.MVT_TYPE = 'DELIVERY'
    AND PRODUCT.CODE = ORDER_MVTS.PRODUCT_CODE
    AND ORDER_MVTS.ORDER_CODE = ORDER.CODE
    AND ORDER.CUSTOMER_CODE = :CUSTOMER
    AND PRODUCT.CODE = :CODE ';
    These two solutions work but Number 1 is bad in theory because it uses a Hint
    and Number 2 may be difficult to code.
    So my question is : Does someone knows another solution to force the use of index ORDER_DHR_VALID that can be simple and reliable.
    Thank you very much for support
    Edited by: remaï on Apr 1, 2009 4:08 PM

    What version of oracle you have? CBO work is different in 9i and 10g.
    Usually cost based optimizer do not want to use index for >< condition with binding variables because optimizer can not use statistic to determine selectivity, and by default selectivity of <> operators is low.
    (As I remember '>' selectivity by default is 5%, you have two conditions > and <, therefore resulting selectivity will be 0.05*0.05=0.0025 as two independent events, but selectivity of other conditions
    ORDER_MVTS.MVT_TYPE = 'DELIVERY' or ORDER.CUSTOMER_CODE = 'ADIDAS' looks much better for CBO)
    The best solution I see is do not use binding variables. Actually your query looks as searching query, which executes not so often, therefore you will not have perfomance win along of skipping execution plan creation.
    Edited by: JustasVred on Apr 1, 2009 10:10 AM

  • I was on facebook and deleted an icon by using the right-click menu but then all my pictures and all profile pictures, could no longer be seen. I was able to view them in Explorer so this is something I did in Firefox. How can I unblock a site?'

    '''I was on facebook and deleted an icon by using the right-click menu but then all my pictures and all profile pictures, could no longer be seen. I was able to view them in Explorer so this is something I did in Firefox. How can I unblock a site?'''

    If you select that right-click context menu entry then you block all images from that domain and not one specific image, so do not use that.
    * Check the exceptions in Tools > Options > Content: Load Images > Exceptions (e.g. sphotos.ak.fbcdn.net)
    You can use these steps to check if images are blocked:
    * Open the web page that has the images missing in a browser tab.
    * Click the website favicon ([[Site Identity Button]]) on the left end of the location bar.
    * Click the "More Information" button to open the "Page Info" window with the Security tab selected (also accessible via "Tools > Page Info").
    * Go to the <i>Media</i> tab of the "Tools > Page Info" window.
    * Select the first image link and scroll down through the list with the Down arrow key.
    * If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.

  • When I cull through my images in the filmstrip everytime I use my right arrow and rate a photo it jumps back to the first thumbnail and i have to arrow all the way back to where I left off.  Is this a setting issue

    When I cull through my images in the filmstrip everytime I use my right arrow and rate a photo it jumps back to the first thumbnail and i have to arrow all the way back to where I left off.  Is this a setting issue

    Art,
    I am trying to follow your very precise steps, and in my case (PSE11 also, Win7), the focus stays on the edited picture after I return from the editor to the Organizer. I am pretty sure that in the previous post describing your situation, I was able to reproduce the problem, but I don't remember on which version. I just tried in 'Folders' view mode to edit in a selected folder, then I clicked 'All media' so that no folder was selected. Same result in both cases.
    Even if you prefer to work in folders view, you could take advantage of the ability to use 'albums'. It's a misleading word to describe a selection, a 'collection' of pictures, which you can sort as you want. It's a kind of  'playlist' like with music items. In the organizer, you can select a folder and create an album (even a temporary one) just by choosing 'create instant album'. Suppose you have made an album from a folder or a selection of highlighted pictures to edit. You can order them in date order, import batch or 'custom' order'. Since PSE12 you can also sort them in filename order. You should never lose the 'focus' on your last edited picture when coming back from the editor to the organizer. If the purpose of that album is only to help in organizing an editing session, you simply delete the album (the playlist) if you don't want to keep the list afterward.
    I hope someone will be able to confirm how that can happen...
    Edit;
    I have just read Brian's post.
    That may be the difference...

  • After using the right mouseclick safari doesn't respond to any mouseclick

    Hi since updating to safari 5.1.1 after using the right mouse click safari doesn't respond to any mouseclick anymore. I can use the keyboard and select menus but that is it. Reinstalled Safari, resetted safari and removed all preferences, caches and disabled all extensions etc. nothing helped. Any suggestions here?
    Im using snow leopard, on a dual core mac Intel xeon desktop.

    Solved it finally after a long time.. I was triggered that another user on the same system did not have the problem I scanned my user library folder: The problem was an old safari extender plugin in my Contextual Menu Items folder. After removal all is working again :-)

  • How to always rotate objects around the same point, even using the right-click menu?

    I need some of my objects to always rotate around the same point. How can I select a point which will stay that way?
    Using the rotate tool resets after deselecting.
    Also, I'd like to rotate objects around a certain point even when using the right click > Transform > Rotate.
    Is it possible?

    Right, so this is where Illustrator falls short with respect you your need, but only in the sense that the reference point can't be made to stick. You can, however, use Smart Guides to make it so the point is easy to set at exactly the same location, (especially since your object has an anchor point there), manually before each rotation.

  • I sign out of my imessage and i tried logging back in and it keeps saying my password incorrect but i know for a fact im using my right password i dont what to do its just not letting me log in

    I sign out of my imessage and i tried logging back in and it keeps saying my password incorrect but i know for a fact im using my right password i dont what to do its just not letting me log in

    Updating Snow Leopard won't help.  You need to Upgrade OS X to Lion or higher if your system will support it.  First check to see if your system meets the system requirements to upgrade.
    Lion system requirements are:
    Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7, or Xeon processor
    2GB of memory
    OS X v10.6.6 or later (v10.6.8 recommended)
    7GB of available space
    Mountain Lion and Mavericks requirements are the same, and are shown here: http://support.apple.com/kb/HT5842.
    If you can run Mavericks, you can download a free upgrade from the Mac App Store.  If your system can only run Lion, or you need Mountain Lion rather than Mavericks for software compatibility reasons, youcan contact the online store at the number shown at the bottom of this page and purchase a redemption code to download it from the Mac App Store.
    After upgrading, you will find iCloud in System Preferences>iCloud on your Mac, and can set it up as explained here: http://www.apple.com/icloud/setup/mac.html.
    Before upgrading, you should be aware that PPC programs such as AppleWorks will not run on Lion or above.  You may want to check the compatibility of your existing programs by checking here: http://roaringapps.com/apps:table.

  • I used to right click on a picture....

    So, I got my MB today. I have a great picture a friend sent thru gmail and I want that to be my background. When I used windows I used to right click and it gave the option of saving as background....what do I do now I am completely NEW to MAC and havent a clue! HELP!!!

    You can set up your MacBook to do a function similar to "right clicking". Go to System Preferences, select Keyboard & Mouse, under Trackpad Gestures select the box that says "place two fingers on trackpad and click button for secondary click". Now when you touch the trackpad with two fingers and click, a "menu window" appears with options similar to right clicking!
    MacBook   Mac OS X (10.4.8)  

  • HT2216 I am on OSX 10.7.5 and recently had to reinstall it due to 'mail' not working correctly.  That problem was resolved but now my I can't use the 'right click' function on the apple usb mouse.  Any clues?

    I am on OSX 10.7.5 and recently had to reinstall it due to 'mail' not working correctly.  That problem was resolved but now my I can't use the 'right click' function on the apple usb mouse.  I only have a previous version re-install disc as I bought the latest OSX off the app store.  Any help gratefully received?

    Hmmm, no, no drivers needed, now it sounds like a bad install... unless you might have some old Mouse software installed???
    If 10.7.0 or later...
    Bootup holding CMD+r, or the Option/alt key to boot from the Restore partition & use Disk Utility from there to Repair the Disk, then Repair Permissions.
    If that doesn't help Reinstall the OS.

  • I can't use the right-click function on websites (i.e. Yahoo! Mail) because Firefox's context menu is in the way. How can I fix this?

    I can't use the right-click function on websites (i.e. Yahoo! Mail) because Firefox's context menu is in the way.

    Tools > Options > Content : JavaScript > Advanced > Allow Scripts to: [X] "Disable or replace context menus"

  • I cannot use the right colors for a web image.

    I cannot use the right colors for a web image. Photoshop CC keeps replacing colors because my colors are "out of color space for print" or something like that (I hope I translated it right - I work with PS Dutch version and this forum is only in English).
    I am not interested in printing at all. I do not want any adaption for printing! I only want the right color on screen for a web image.
    I changed the color settings many times,  I created my image all over again, but Photoshop keeps replacing my vivid red by pale pink because of print colors.
    Thanks for your help.

    Use SRGB color space. and in the color picker when you see the warning don't click on the warning to have it fix the issue. As that will change the color you want want to use.

  • HT1270 Used the right memory, both for my iMac and MacBook Pro, iMac worked, MacBook Pro didn't start (warning tone). Any idea?

    Used the right memory according to page, both for my iMac and MacBook Pro, iMac worked, MacBook Pro didn't start (warning tone).
    Any idea?

    I suggest you buy your memory from OWC or DataMem. Both guarantee the memory works or will replace it if it does not, no questions asked, within their 30 day return period. I've used both for over 20 years, and no complaints.

Maybe you are looking for

  • Is there an easy way to generate a site map of an APEX application ?

    Hi. Is there an easy way to generate a site map of an APEX application ? Thanks.

  • Skype Calls not received when MacBook Air is asleep

    My MacBook Air is running Mountain Lion OS 10.8.5 with Skype 6.14. Skype video calls are received normally with notification sounds as long as the MacBook Air is not asleep. It will also receive a video call one time while asleep if Skype has first b

  • Configuring firefox and IE in DreamWeaver

    You view website by clicking link below: http://killerarcadegames.com/games.html If have IE and Firefox you can see the problem. In Firefox i looks what it suppose to look like but in IE the tabs are all messed up. I remember making the mistake when

  • Something's Stuck

    All of a sudden, my brand new MacBook started acting weird. When I use my mouse to click on a menu, the menu options show, but then go away. I'm not able to open or close an application because I can't choose a menu option. Also, in some programs, I

  • Sales order with MRP run but no need of sales order stock while PGI

    Dear Gurus, We have scenario in company that we want to run MRP for sales order & generate requirements. But while doing post goods issue for same sales order, sales order stock need not be present. Please tell which planning strategy, strategy group