Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Mouse resize listener

Hello

Im trying to catch a resize event of my application. The problem is
that I get many resize events while I only need the last one, i.e the
last event fired when my mouse is up. So I tried having a global
boolean variable that is set to true when I get a control resize
event. Also I have a MouseListener

<code>
shell.addMouseListener(new MouseAdapter(){

				public void mouseUp(MouseEvent me)
				{
					System.out.println("mouseUp");
					if(resizing)
					{
						resizing = false;
						System.out.println("Do the magic");
					}
				}
			});
</code> 

The problem is that the "mouseUp" sentence is not written to the
screen when I drag the border and release the mouse. But when I double
click on the title bar of the shell I get the MouseUp event...

Any suggestions

Thanks
Brian


Back to the top