/** * @param e */ private void updateRollover(ComponentEvent e) { Point componentLocation = e.getComponent().getMousePosition(); if (componentLocation == null) { componentLocation = new Point(-1, -1); } // LOG.info("" + componentLocation + " / " + e); updateRolloverPoint((JComponent) e.getComponent(), componentLocation); updateClientProperty((JComponent) e.getComponent(), ROLLOVER_KEY, true); }
/** * @param e */ private void updateRollover(ComponentEvent e) { Point componentLocation = e.getComponent().getMousePosition(); if (componentLocation == null) { componentLocation = new Point(-1, -1); } // LOG.info("" + componentLocation + " / " + e); updateRolloverPoint((JComponent) e.getComponent(), componentLocation); updateClientProperty((JComponent) e.getComponent(), ROLLOVER_KEY, true); }
g.fillRect(0, 0, render.getWidth(), render.getHeight()); final Point mouse = getMousePosition(); if(mouse != null){ if(box.contains(mouse)) {
/** * @param e */ private void updateRollover(ComponentEvent e) { Point componentLocation = e.getComponent().getMousePosition(); if (componentLocation == null) { componentLocation = new Point(-1, -1); } // LOG.info("" + componentLocation + " / " + e); updateRolloverPoint((JComponent) e.getComponent(), componentLocation); updateClientProperty((JComponent) e.getComponent(), ROLLOVER_KEY, true); }
/** * @param e */ private void updateRollover(ComponentEvent e) { Point componentLocation = e.getComponent().getMousePosition(); if (componentLocation == null) { componentLocation = new Point(-1, -1); } // LOG.info("" + componentLocation + " / " + e); updateRolloverPoint((JComponent) e.getComponent(), componentLocation); updateClientProperty((JComponent) e.getComponent(), ROLLOVER_KEY, true); }
public void mouseDragged(MouseEvent me) { super.mouseDragged(me); Point pos = panel.getMousePosition(); System.out.println(pos); if(panel.getWidth()-pos.x<50 && panel.getHeight()-pos.y<50) public void mouseDragged(MouseEvent me) { super.mouseDragged(me); Point pos = panel.getMousePosition(); if(panel.getWidth()-pos.x<50 && panel.getHeight()-pos.y<50) btnNewButton_1.setLocation(panel.getMousePosition()); validate(); repaint();
popup.show(jTextPane1, jTextPane1.getMousePosition().x, jTextPane1.getMousePosition().y);
Point mouse = parent.getMousePosition(); try{ if(mouse.y - lblYPt >= 30){
DropTarget test = (DropTarget) event.getSource(); Component ca = (Component) test.getComponent(); Point dropPoint = ca.getMousePosition(); Transferable tr = event.getTransferable();