JSlider and mouse click not working

I am using a JSlider class so the user can choose a population size. I'm showing the slider with a scale from 0-100.
When I move the slider button with my mouse the value changes. However, when I click anywhere else on the slider, nothing happens. It should be moving to the next minor tick. Here is my code snippet:
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
(here's the construction of the slider)
private JSlider m_popSizeSlider = new JSlider(0,100,20);
m_popSizeSlider.addChangeListener(new SizeSliderHandler());
// now handle the size slider
m_popSizeSlider.setPaintTicks(true);
m_popSizeSlider.setPaintLabels(true);
m_popSizeSlider.setSnapToTicks(true);
m_popSizeSlider.setMajorTickSpacing(20);
m_popSizeSlider.setMinorTickSpacing(5);
comboPanel.add(new Label("Size of Population: "));
comboPanel.add(m_popSizeSlider);
(here's the change listener code - defined as an inner class)
class SizeSliderHandler implements ChangeListener
* <p> This method is called when the user clicks on the size slider
public void stateChanged(ChangeEvent e)
JSlider s = (JSlider) e.getSource();
m_popSize = (int) s.getValue();
//System.out.println(m_popSize);
so what am I doing wrong?
thanks
barry

This page has lots of examples:
http://www.esus.com/docs/GetIndexPage.jsp?uid=301

Similar Messages

  • Suddenly my double click both on track pad and mouse is not working

    suddenly my double click both on track pad and mouse is not working.in System Preferences,track pad, i have ticked and unticked the Tap to click several times.Restarted the mac for several times at well but still i do not have double click.help me please.

    It might be the double click speed setting.
    Look in System Preferences > Universal Access > Mouse & Trackpad tab > Trackpad options.. button > move the double click speed to the slow side of the range.

  • My wireless keyboard and mouse do not work on my All-In-One computer?

    Q.: My wireless keyboard and mouse do not work on my All-In-One computer?
    A.: If your wireless keyboard and mouse do not work even after changing the batteries, please try re-syncing them by following these steps.
    1. Make sure the computer is on, plug in the USB receiver. Push the button on the USB receiver until it flashes blue.
    2. While the receiver is still flashing, press the red connect button on the keyboard (Make sure the batteries are installed). The USB receiver should stop flashing after pressing the button on the keyboard. It may take up to 8 seconds to sync.
    3. Repeat the same process for the mouse. Push the button on the USB receiver, then press the connect button on the mouse (Make sure the mouse is on).
    Note: This applies to all MSI All-In-One computers that include the ES500W wireless keyboard and SW130 mouse.

    "This machine has an added 4 USB ports, could this be causing a problem?
    It definitely could be the source of the problem. Perhaps the PCI card was bumped loose during shipping?
    Have you tried removing the card? That's where I would start.
    Keep us posted.

  • Hi, my Hp Pavilion lap, keyboard and mouse is not working

    Hi, my Hp Pavilion lap, keyboard and mouse is not working while  i am login into  windows 8.1. but it works in bois mode. can you please tell me the reason 

    Hi there,
    I had the same problem so did some research. Downloaded this driver and now everything's sweet. Hope it works for you too!! (This is only to get your hdmi working, sorry can't help you with the rest)
    http://www.nvidia.co.in/object/Quadro_3D_Vision_US​Bdriver_197.03_in.html

  • Mouse click not working

    i set up a new battery, i pressed command D without not cause. After that my mouse is not working, its noly moving and scroll. Does not CLick.what to do now?

    Please reset the SMC Control, Apple explains how in:
    http://support.apple.com/kb/ht3964

  • Mouse click not working properly

    I just bought a macbook pro last week. Since using lion, I have noticed a problem clicking. Such as opening folders, minimizing windows, clicking the back space button etc. I click on a few folders and they open, and then I try to click on another one and it refuses to open no matter how many times I click on it unless I unselect it and try again. It is not consistent to specific folders/icons, it just happens at random. It is as if the OS is not registering clicks consistently, like it were a hardware problem. Also my right click malfunctions at times and will either not work or will behave like it is the left click and vice versa and takes awhile to regulate itself.
    Keep in mind I use both a wireless usb mouse and my trackpad and this is a problem I experience with both of them. I am using the latest version (10.7.3)

    Your warranty includes 90 days of phone support. Call AppleCare.

  • Mouse clicks not working on published air app, works fine when debugging/testing

    So I have an issue where when debugging my Air application, it runs fine and mouse clicks work and everything.  When I publish the application and install it, it plays fine but clicking does nothing.
    We have an older version which is working when we publish it and we're trying to add things in one step at a time, but I figured I'd see if anyone else has had this issue.  A bit frustrating.
    Thanks!

    FIXED!!!!
    We're using Dropbox to share files and it turns out that two people having project open at same time is a bad idea when doing final publish!  It creates conflict files and effects the final package or something of that nature.
    Glad we got that one figured out!

  • Webi: Mouse clicks not working

    Hi
    I am using BO XI 3.1, Webi 12. .1.0.882 client. It is not responding to mouse clicks although I can use keyboards to open the universe e.g.(even for logon).
    Any ideas why is this happening and how to sort this?
    Thanks for all help.

    I have the same problem some times.
    This is going to sound crazy, but try this:
    1. Lay the mouse down like you would if you were going to use it.
    2. Use you index finger and "bang" on the mouse like you were mad at it. Hit it where the primary button (left side for me) is. Don't be too aggressive.
    3. It should work. It has always worked for me.
    4. It also helps to clean the track ball. I just run the track ball back and forth on my jeans.
    Good luck!
    P.S. I do not think this will void any warranty, just don't tell Apple!

  • T540p and Middle-Click not working

    So, I just got my T540p 2 days ago, and while getting everything set up, I realize that a few things are off with the clickpad.  For a while, most clicks were not being registered: left, right, or middle.  It could take some furious clicking just to get one click registered.  Next, no matter what settings I set, I could not get middle click to register as a middle-click - they were always taken as left clicks.  And finally, I could not get right-click to register unless I set button size to either Large or Full.  At standard, right-clicks were seen as left-clicks.
    Here's the rub - I think I've narrowed it down to the driver.  After submitting a warranty request yesterday, I started playing with it some more, and here is what I've found:
    After a few full shutdowns and reboots, responses got better:  Clicks were more reliably registered, and right-clicks worked, even on Standard button size in the settings.  However, middle-clicks were still impossible.  Any attempt at a middle-click was registered as a left-click.  This was with the Lenovo driver installed.
    After uninstalling the Lenovo driver, middle clicks started working.  Unfortunately, mouse speed is painfully slow without the Lenovo driver installed, so this is not much of an option.  I tried downloading a driver directly from Synaptics, and that did not seem to help the mouse speed - this driver doesn't seem to add the UltraNav tab to the mouse settings which allows me to increase the speed of the TrackPoint.  However the Synaptics driver (which claims to be older than the Lenovo driver) did allow middle-clicks.
    Next, I re-installed the Lenovo driver and after the first reboot clicks were back to being unreliable and middle-clicks vanished again.  After a 2nd reboot, left and right- clicks became better, but still no middle clicks.
    So, I've determined that it's not a hardware issue anymore, but a driver issue.  I now have a box on the way to ship my laptop back - but since it's not a hardware problem, I don't see the need to send the laptop back.
    Does anyone have any insight on what I should do?  Send it back and let Lenovo attempt to change settings/etc. to get my middle-click working?  Or patiently wait for a driver update that may or may not fix the middle-click?
    I will say that I am very impressed at the speed of getting the 'warranty fix' box, so THANK YOU to Lenovo for an amazing response there.  I'm just getting frustrated with the clickpad issues.

    I have the exact same question, prior to UltraNav driver installation, you can simply Tap-to-click while using the Trackpoint. After installing the driver, you MUST click down on the Clickpad to send a click while using the Trackpoint. This is such a simple software solution that has seriously made me regret my decision to by a newer Thinkpad. The new xx50 series Clickpad is interchangeable with the xx40 series but I am not spending nearly 70$ to solve a simple software problem!
    I recall that back in the days of the X200/X201 there were a decent amount of tips/tricks we could do via the registry to enable "hidden" features of the Synaptics touchpad/trackpoint combo. Is there a similar "hack" we could do to enable the tap-to-click functionality while using the Trackpoint?

  • G500s Touch keyboard and mouse pad not working

    I've uninstalled and reinstalled the drivers. The solution center says everything is fine. USB mouse works, as does the touch screen, just not the actual keyboard or pad.
    Please help.

    For additional information - i now have my keyboard working, but the touch pad is still not working. I went to the lenovo site and downloaded the elan driver again. it extracted, but once i clicked for it to install, it says No Appropriate Driver to be installed.

  • Ctrl and left click not working in DW CS5

    When Im working in design view for some reason my links are not working when I press ctrl and left click. To make them work I have to right click and select follow link.
    Its not a major problem because I can still carry on, but its annoying!

    Mr Construction wrote:
    When Im working in design view for some reason my links are not working when I press ctrl and left click.
    I presume you're talking about Live View, because links don't work in Design view.
    One thing you can try is selecting View > Live View Options > Follow Links Continuously, or select the option from the Live View Options menu in the Browser Navigation toolbar.
    It works only for the current tab, but is useful if you're following a lot of links.

  • Red track button and mouse does not work sometimes on start up and after stand by mode

    i recently downgraded my t61p from vista basic to xp pro.  all the drivers were installed but my mouse doesn't seem to work consistently.  if i turn it on, sometimes it doesnt move -- i then have to hit standby and see if it works after that..  sometimes it does
    also, if leave my computer on for a while -- it doesnt properly work then either
    any suggestions?  i've tried re-installing the drivers but doesnt do much.  
    any help is much appreciated.  thanks.  

    Hello,
    have you installed all recent windows updates like SP3?
    What kind of mouse are u using?The normal ultranav on your TP or a third party mouse? Bluetooth or cable?
    Some bluetooth mice are disconnecting after some time, also your USB port, when on battery can switch off to save energy.
    Greets
    Message Edited by Agotthelf on 09-06-2008 10:23 AM
    Follow @LenovoForums on Twitter! Try the forum search, before first posting: Forum Search Option
    Please insert your type, model (not S/N) number and used OS in your posts.
    I´m a volunteer here using New X1 Carbon, ThinkPad Yoga, Yoga 11s, Yoga 13, T430s,T510, X220t, IdeaCentre B540.
    TIP: If your computer runs satisfactorily now, it may not be necessary to update the system.
     English Community       Deutsche Community       Comunidad en Español

  • Mouse Clicker Not Working

    Hey
    You know how the mouse clicker is supposed to pop back up after you click it? Well only one side of my clicker does. The other side will not pop back up. I believe my laptop is still under warranty. If I take it into the Apple store can they fix it?
    Thanks

    If you are under warranty, just take it back and Apple should fix it.
    If you are out of warranty, I'm sorry no answer for that.

  • Help! My Keyboard and mouse will not work all of a sudden on my G4

    I am having a problem with both my keyboard and mouse. I have a graphite G4 and recently had to run disk warrior on i. I have had endless problems with this computer and even have a 2nd hardrive on it since it only came with a 10Gig. Needless to say it is all I have right now. I am running os x 10.2.2 on it and a few days after I recessitated it with disk warrior my keyboard and mouse suddenly went dead while I was on the internet. I tried pluging the two into different usb ports both on the tower and also into the flat panel mac display that it came with and nothing. I plugged in my wacom tablet and that works. i then tested the mouse and keyboard on my husband's dell laptop and they work. I cannot reset the PRAM b/c the keyboard won't work! What do I do??????

    Besides removing the battery, you can do a PMU reset which will zap PRAM. See Mac PRAM, NVRAM, CUDA/PMU & Battery Tutorial
    You only describe your Mac as a G4 graphite, which I believe is a G4 AGP. Here’s a diagram showing the location of the PMU reset button.
    G4 AGP Graphics (Sawtooth)/Gigabit Ethernet
    http://img96.imageshack.us/img96/5706/sawtoothlogicbd2yu.jpg
    Look at these links to determine which model G4 you have.
    Power Mac G4: How to Differentiate Between Models
    http://docs.info.apple.com/article.html?artnum=58418
    Power Mac G4: How to Differentiate Between Models (Part 2)
    http://docs.info.apple.com/article.html?artnum=42739
     Cheers, Tom
    Also look at this link.
    Common fixes for USB device issues (unrecognized, etc.)
    http://www.macfixit.com/article.php?story=20070824012114701
    Message was edited by: Texas Mac Man

  • Mouse clicks not working

    Hello,
    I am managing a mac pro (leopard) from a macbook (leopard) using remote desktop 3.2. Often when I control the mac pro, and enter a user session the mouse clicks on the managed computer behave incorrectly. A normal click corresponds to a click with a side button (the ones that show all the windows on screen). When this happens I have no other solution than to reboot the managed machine because I can't control it with the mouse. (can't select anything)
    Has this happened to anyone else ?

    Oops. Doing the same thing again. If I disconnect/reconnect the mouse, the buttons get switched to the right position. After that log out/in and the buttons are again the other way around. To do a click have to press the command key while pressing the mouse button.

Maybe you are looking for

  • Airport extreme throughput not what it should be!

    I have an airport extreme base station distributing IP addresses as a router and connected to a cable modem. My tests are with my Powerbook G4 Ti 1 GHz that only has 802.11b and not g. The extreme is set up for the b/g setting but I think I tested it

  • HT204291 Airplay w iPad , Black screen on TV worked , fine yesterday?

    Will not mirror tv screen goes black when mirroring is turned. Work fine yesterday.

  • Report requirements based on cal day and calmonth

    Hello friends, I have to create a report in which it should show me the daily quantity produced and the average quantity of the given month. In report it should show me the daily produced quantity for the given month and the average of the month. as

  • Deleted order reappeared

    Hi,          We have a background job with program delete_pp_order, that deleted a PPDS output firmed planned order and sends the deletion to R/3. I can see the planned order and qty. in the spool of the job. Now when I looked at the product view,it

  • Document Restrictions of Security Policies

    Hello, I've been hunting around but can't find it. Is there a concise reference for how to use Adobe Acrobat8 Security features with the Adobe Document Center? Is it so new that there's no book (Quick Start, etc.) on it? I send PDFs to people. But I