Where can I find drivers for my Sony Vaio touchpad?
278
Most Sony laptops use Alps touchpads. This is a link to a WIN7 64 bit driver package ALPS Windows 7 x64 You should be able to find an x86 driver with a bit of digging at Sony Support as mentioned by @slhck
Related videos on Youtube
Author by
Ian Finlayson
Updated on September 18, 2022Comments
-
Ian Finlayson almost 2 years
I am trying to create a kind of simplified graphics library on top of the built-in Java graphics system. I want to use it in teaching so students can create graphical programs without needing to create their own classes, or especially need to use inheritance.
Anyway, as I have it, the windows do not close as I expect them to and I cannot figure out why. The weird thing is that if I have a println in the main program loop it does work. What's going on? Here is a minimal example:
package test; import javax.swing.JFrame; import java.awt.event.WindowListener; import java.awt.event.WindowEvent; import java.util.Queue; import java.util.LinkedList; /** enumeration of the different types of events which a window can produce */ enum EventType { Closed, KeyPressed, KeyReleased, MousePressed, MouseReleased, MouseMoved } /** a class which represents an event which a window can produce */ class Event { private EventType t; /** create a new event of a given type */ public Event(EventType type) { t = type; } /** check which type of event it is */ public EventType getType( ) { return t; } } /** a graphics window */ class Window implements WindowListener { private JFrame frame; private boolean open; private Queue<Event> events; /** create the window */ public Window(String title, int width, int height, boolean resizable) { frame = new JFrame(title); frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); frame.setSize(width, height); frame.setResizable(resizable); frame.setVisible(true); frame.addWindowListener(this); events = new LinkedList<>( ); open = true; } /** checks whether the window is still open or not */ public boolean isOpen( ) { return open; } /** closes the window */ public void close( ) { open = false; frame.dispose( ); } /** returns the next event, or null if there is none */ public Event pollEvent( ) { return events.poll( ); } /* functions which implement window listening */ public void windowOpened(WindowEvent e) { } public void windowIconified(WindowEvent e) { } public void windowDeiconified(WindowEvent e) { } public void windowActivated(WindowEvent e) { } public void windowDeactivated(WindowEvent e) { } public void windowClosed(WindowEvent e) { } public void windowClosing(WindowEvent e) { System.out.println("Adding close event"); events.add(new Event(EventType.Closed)); } } public class Test { public static void main(String args[]) { // create the window Window window = new Window("Hello world!", 800, 600, false); // while the window is open while (window.isOpen( )) { // check for events Event event = window.pollEvent( ); if (event != null) { switch (event.getType( )) { // handle the window close event case Closed: System.out.println("Calling close"); window.close( ); break; } } // when this line is un-commented, it works as expected??? //System.out.print('.'); } System.out.println("All done!"); } }
-
slhck over 12 yearsSony Support. Do you have a more precise model number?
-
Flamyx over 12 yearsI can't find my model number in there :/, any other suggestions please ?
-
Murat Karagöz over 8 yearsUnrelated, but why do you have whitespaces between brackets
window.close( )
? -
Ian Finlayson over 8 years@LuxxMiner, I want to explicitly catch the closing which is why I implement implements WindowListener. According to the docs (docs.oracle.com/javase/tutorial/uiswing/events/…) that should be an OK approach?
-
Betlista over 8 years@MuratK.probably a code formatter setting... You can define the same in Eclipse for example...
-
Mati over 8 yearsCan you tell what you want to achive? I've launched this program and after closing it, I have "Adding close event Calling close All done!"
-
Ian Finlayson over 8 years@MuratK. that is just my style. I know it's unusual, but they look weird to me as (). I should probably learn to do that though...
-
Lukas Rotter over 8 years@IanFinlayson You can also catch the closing event with
EXIT_ON_CLOSE
orDISPOSE_ON_CLOSE
as the default close operation, it will still work. -
Ian Finlayson over 8 years@Mati maybe it is platform-specific, but when I run this program (on Linux), the window does not close, but just stays open forever.
-
Ian Finlayson over 8 years@LuxxMiner Oh interesting! I will try that.
-
-
Flamyx over 12 yearsill look it up, and its okay I have the 64 bit WIN, but thx anyways :D
-
QMaster almost 10 yearsIt's appropriate just for VPCEB11FM/BI Model as you can see in top of the page in red color "IMPORTANT: This file is only for use with the models identified. Not all models are sold in all countries." Anyway i downloaded My VAIO version VPCF12THX/H but when i try to install it warn about this program is just for windows vista/windows 7. My VAIO has Windows 7 Ultimate 64Bit and i don't understand why i saw this message.
-
user1803551 over 8 yearsTip: try not to name your classes with the same names as classes from relevant packages.
Window
andEvent
are already used in the graphical contexts you are using. -
Ian Finlayson over 8 yearsThat doesn't really help. It does cause the window to close, but the program still hangs forever and never finishes main.
-
James Wierzba over 8 yearsRemove the while loop, it looks like it might be an infinite loop. Setting
DISPOSE_ON_CLOSE
should stop the VM entirely when the windows close. -
Ian Finlayson over 8 yearsThat makes sense, but that's not how I want it to work. I want to put a procedural style API on top of the callback based one. So that you could write graphical programs just in a main function.
-
martinez314 over 8 years@JamesWierzba it's called from his window.close() method.
-
Ian Finlayson over 8 yearsThanks so much. This wasn't exactly what I needed, but talking about the EDT which I hadn't heard of led me to the answer (stackoverflow.com/a/34136793/2213804). Thanks!