private void placeBlock(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_placeBlock
// TODO add your handling code here:
    Point p = evt.getPoint();
    int column = (int) (p.x / fieldPanel.getBlocksize());
    int row = (int) (p.y / fieldPanel.getBlocksize());
    
    String name = getSelectedButtonName(blocks);
    
    try {
        fieldPanel.setBlockElement((BlockElement) (Class.forName("classes." + name).newInstance()), column, row);
    } catch (ClassNotFoundException cnfE) {
        currentSelectedBlockElement.setBorderColor(Color.BLACK);
        currentSelectedBlockElement = fieldPanel.getBlockElement(column, row);
        currentSelectedBlockElement.setBorderColor(Color.yellow);
        fieldPanel.repaint();
        System.out.println(currentSelectedBlockElement.toString());
        setAttributePanelVisibility(true, currentSelectedBlockElement);
    } catch (IllegalAccessException iaE) {
        
    } catch (InstantiationException iE) {
        
    }
}//GEN-LAST:event_placeBlock