@Override
	public void mouseClicked(MouseEvent e) {		
		if(e.getButton() == 3) {
			Point mouse = new Point(e.getX(), e.getY());
			Point mouseZoomed = new Point((int) (e.getX() / (pv.getZoom() / 100)), (int) (e.getY() / (pv.getZoom() / 100)));
			
			if(pv.selected.isEmpty()) {
				boolean shown = false;
				for(int i = 0; i < pv.tables.size(); i++) {
					Table t = pv.tables.get(i);
					if(t.contains(mouseZoomed)) {
						pv.selected.clear();
						pv.selected.add(t);
						pv.tableMenu.setTableOn(t);
						pv.tableMenu.showMenu(mouse, true);
						shown = true;
						break;
					}
				}
				if(!shown) {
					pv.selected.clear();
					pv.tableMenu.showMenu(mouse, false);
				}
			} else if(pv.selected.size() >= 1) {
				boolean shown = false;
				
				for(int i = 0; i < pv.selected.size(); i++) {
					Table t = pv.selected.get(i);
					
					if(t.contains(mouseZoomed)) {
						pv.tableMenu.setTableOn(t);
						if(pv.selected.size() == 1) {
							pv.tableMenu.showMenu(mouse, true);
						} else {
							pv.tableMenu.showMenu(mouse, false);
						}
						shown = true;
						break;
					}
				}
				
				if(!shown) {
					for(int i = 0; i < pv.tables.size(); i++) {
						Table t = pv.tables.get(i);
						if(t.contains(mouseZoomed)) {
							pv.selected.clear();
							pv.selected.add(t);
							pv.tableMenu.setTableOn(t);
							pv.tableMenu.showMenu(mouse, true);
							shown = true;
							break;
						}
					}
				}
				
				if(!shown) {
					pv.selected.clear();
					pv.tableMenu.showMenu(mouse, false);
				}
			}
			
			pv.info.update();
		}
	}