Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 1st, 2007  |  syntax: None  |  size: 0.65 KB  |  views: 103  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public class pladenPanel extends JPanel implements MouseAdapter {
  2.         JPanel Pladen = new JPanel(new GridLayout(10,10));              
  3.        
  4.         public void lavPladen() {
  5.            
  6.             for(int i=0; i<10; i++) {
  7.                 for(int y=0; y<10; y++) {
  8.                     int placering = y+i;
  9.                     Pladen.add(new JButton().putClientProperty(placering , Point(y,i)));
  10.                    
  11.                 }
  12.             }
  13.            
  14.             addMouseAdapter(this);
  15.            
  16.         }
  17.                        
  18.        
  19.     }
  20.            
  21.     public void mouseClicked(MouseEvent e) {
  22.                
  23.     }