|
|
1
13
这个 实现mouselistener、mousemotionlistener 只允许displayArea类监听一些待定义的Swing组件的鼠标事件。你必须明确地定义它应该监听什么。所以我想你可以在构造函数中添加这样的东西:
|
|
|
2
3
我在代码中没有看到任何地方你为DisplayArea调用addMouseListener(this)或addMouseMotionListener(this)来订阅这些事件。 |
|
|
3
3
我在这里没有看到任何注册到鼠标监听器的代码。您必须在DisplayArea上调用addMouseListener(this)和addMouseMotionListener(this)。 |
|
|
Jörg · 如何更改多行JButton中的行距 7 月前 |
|
|
Clive Galway · 将摆动元件包装在面板顶部 1 年前 |
|
|
AlexHomeBrew · 如何将图像放在左上角的滚动窗格中 1 年前 |
|
|
Vithor Roder · Java CellEditor 1 年前 |
|
|
Dromlius · JPanel透支重叠的JComcoBox 1 年前 |