@Override public void mouseReleased(MouseEvent e) { Main.pressed = false; Main.reset(); Main.send(); Main.f.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); }
@Override public void mouseEntered(MouseEvent e) { if (Main.pressed) { this.setBorder(BorderFactory.createMatteBorder(2, 2, 2, 2, Color.red)); if (!this.premuto) { int cx = e.getComponent().getX(); int cy = e.getComponent().getY(); cx = cx / 65; cy = cy / 65; if (Main.lastx == 125) Main.lastx = cx; if (Main.lasty == 125) Main.lasty = cy; if (Main.IsInRangeM(cx, cy)) { Main.lastx = cx; Main.lasty = cy; Main.sfinale += this.getText(); premuto = true; Main.l.setText(Main.sfinale.substring(4)); } else { Main.pressed = false; Main.sfinale = null; Main.f.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); Main.lastx = cx; Main.lasty = cy; Main.reset(); } } } }