-
Bug
-
Resolution: Duplicate
-
P5
-
None
-
5.0
-
None
-
sparc
-
solaris_8
Name: adR10249 Date: 11/18/2003
There are no "MouseReleased" and "MouseClicked" events generated by the code
below with MToolkit. It works fine with XAWT.
import java.awt.*;
import java.awt.event.*;
public class ScrollBarTest implements MouseListener {
Frame frame;
Scrollbar scrollBar ;
public ScrollBarTest() {
frame=new Frame();
frame.setTitle("Motif Scroll Bar Test");
frame.setLayout(new FlowLayout());
scrollBar = new Scrollbar(Scrollbar.VERTICAL, 0, 60, 0, 400);
scrollBar.addMouseListener(this);
frame.add(scrollBar);
frame.setBackground(Color.red);
frame.setSize(500,200);
frame.setVisible(true);
frame.toFront();
}
public void mousePressed(MouseEvent e ){
System.out.println("in mouse Pressed");
}
public void mouseClicked(MouseEvent e ){
System.out.println("in mouse Clicked");
}
public void mouseReleased(MouseEvent e ){
System.out.println("in mouse Released");
}
public void mouseExited(MouseEvent e ){ }
public void mouseEntered(MouseEvent e ){ }
public static void main(String args[]){
ScrollBarTest avt = new ScrollBarTest();
}
}
======================================================================
- duplicates
-
JDK-4515085 Focus and MouseEvent problems with Scrollbar
-
- Resolved
-