Advertisement
pmanriquez93

Untitled

Oct 7th, 2015
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. // #Mod1 - Inicio
  2. JLabel celda = new JLabel("Celda");
  3. celda.setIcon(new ImageIcon("imagenes\\celda.jpg"));
  4. celda.setBounds(0,0,1024,768);
  5. celda.setOpaque(false);
  6. getContentPane().add(celda);
  7. celda.addMouseListener(new java.awt.event.MouseAdapter(){
  8. public void mouseClicked(java.awt.event.MouseEvent event)
  9. {
  10. if (event.getClickCount() == 2 && event.getButton() == MouseEvent.BUTTON1)
  11. int valorX, valorY;
  12. valorX = event.getX();
  13. valorY = event.getY();
  14. if (valorX )
  15. JOptionPane.showMessageDialog(null,"Presionastre esta waa");
  16. //System.out.println("Presionaste");
  17. }
  18. });
  19.  
  20. // #Mod1 - Fin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement