public Hub(){
		setLayout(null);
		setDoubleBuffered(true);
		
		Pool pool = Main.status.getPool();
		
		Drop[] drops = pool.getDrops();
		
		for(int n = 0; n < drops.length; n++){
			if(drops[n].getType().equals("distributor")){
				dmodel.add(dmodel.size(), drops[n].getName());
			}
			else if(drops[n].getType().equals("client")){				
				smodel.add(smodel.size(), drops[n].getName());
				receive.add(drops[n]);
			}
			else{
				JOptionPane.showMessageDialog(null, "A fatal error occured while loading your hub.");
				System.exit(0);
			}
		}
		
		pmodel.addColumn("Name");
		pmodel.addColumn("File ID");
		pmodel.addColumn("File");
		pmodel.addColumn("IP Address");
		
		dscroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
		sscroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
		pscroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
		
		distList.setBounds(10, 40, 370, 300);
		slist.setBounds(400, 40, 370, 300);
		plist.setBounds(10, 375, 800, 100);
		
		dscroll.setBounds(10, 40, 375, 300);
		sscroll.setBounds(400, 40, 375, 300);
		pscroll.setBounds(10, 372, 765, 100);
		
		dist.setBounds(10, 10, 200, 20);
		syncing.setBounds(400, 10, 200, 20);
		this.pool.setBounds(10, 345, 200, 20);
		
		distList.setVisible(true);
		slist.setVisible(true);
		plist.setVisible(true);
		
		plist.setShowGrid(false);
		
		ListListener ll = new ListListener();
		
		distList.addMouseListener(ll);
		distList.addMouseMotionListener(ll);
		slist.addMouseListener(ll);
		slist.addMouseMotionListener(ll);
		plist.addMouseListener(new PoolListener());
		
		distList.setCellRenderer(new Row());
		slist.setCellRenderer(new Row());
		
		add(dist);
		add(syncing);
		add(dscroll);
		add(sscroll);
		add(this.pool);
		add(pscroll);
		
		distList.setDropTarget(new DropTarget(){
			public synchronized void drop(DropTargetDropEvent e){
				try{
					e.acceptDrop(DnDConstants.ACTION_COPY);
					
					List<File> droppedFiles = (List<File>) e.getTransferable().getTransferData(DataFlavor.javaFileListFlavor);
					
					for (File file : droppedFiles){
						Random rand = new Random();
						int id = rand.nextInt(40001) + 10000;
						
						while(Main.distro.getPorts().contains(id)){
							id = rand.nextInt(40001) + 10000;
						}
						
						Drop drop = new Drop(file.getAbsolutePath(), "distributor", Main.status.getIP(), "", id + "");
						
						if(Main.status.getPool().addFile(drop)){
							dmodel.addElement(drop.getPath());
							Main.distro.addDrop(drop);
						}
						else{
							JOptionPane.showMessageDialog(null, "An error occured while adding this file.");
						}
					}
				}
				catch(Exception ex){
					ex.printStackTrace();
				}
			}
		});
		
		menu = new ContextMenu();
		
		Main.status.startDistro();
	}