public DeckList(int userid) {
		count = 0;
		// this.setSize(this.getWidth() / 3, this.getHeight());
		String url = "http://128.199.235.83/icw/?q=icw/service/all_ic_of&user="
				+ userid;
		JsonObject job = null;

		InputStream is;
		final Dimension screenSize = getToolkit().getScreenSize();
		//System.out.println(screenSize.getHeight());
		CardData.saveAllCardsToLocal();
	

		try {
			is = new URL(url).openStream();
			Gson gs = new Gson();
			job = gs.fromJson(new InputStreamReader(is), JsonObject.class);
			String usercard = job.get("data").toString(); // [1,4,6,6,6,7,7,8,8,10,10,10,11,13,13,14,14,15,16,17,17,17,17,18,18,18,19,19,19,20,27,29,32,33,39,41,46,52,53,54]
			int count = 1;
			
			for (int i = 0; i < 39; i++) {

				deck.add(new Card(Integer.parseInt(usercard.substring(count,
						usercard.indexOf(",", count)))));

			
				count = usercard.indexOf(",", count) + 1;
			}
			deck.add(new Card(Integer.parseInt(usercard.substring(count,
					count + 2))));

		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		this.setVisible(true);

		int track = 0;
		
		right.setLayout(new GridLayout(40, 7));
		left.setVisible(true);
		left.setLayout(new GridLayout(20,7));
		woo =deck;
		
		for (int i = 0; i < 40; i++) {
			ImageIcon ee = deck.get(track).picture;
			final Image picz3 = ee.getImage().getScaledInstance(20, 20,
					java.awt.Image.SCALE_SMOOTH);

			final aaaa temp = new aaaa(track);

			temp.setLayout(new GridLayout(1, 6));
			JLabel title = new JLabel("" + deck.get(track).title);
			temp.add(new JLabel(new ImageIcon(picz3)));
			temp.add(title);

			JLabel atk = new JLabel("ATK: " + deck.get(track).atk);

			temp.add(atk);

			JLabel lp = new JLabel("LP: " + deck.get(track).lp);

			temp.add(lp);

			JLabel lck = new JLabel("LCK: " + deck.get(track).lck);

			temp.add(lck);

			JLabel car = new JLabel("CAR: " + deck.get(track).car);
			

			temp.add(car);
			temp.setOpaque(false);
			if(left.getComponentCount()!=20) go.setEnabled(false);
			else go.setEnabled(true);
			go.addActionListener(new ActionListener(){

				@Override
				public void actionPerformed(ActionEvent arg0) {
					// TODO Auto-generated method stub
					
				}
				
			});
			left.addMouseListener(new MouseListener() {

				@Override
				public void mouseClicked(MouseEvent arg0) {
					// TODO Auto-generated method stub

				}

				@Override
				public void mouseEntered(MouseEvent arg0) {
					// TODO Auto-generated method stub
					
					check = false;
				
				}

				@Override
				public void mouseExited(MouseEvent arg0) {
					// TODO Auto-generated method stub
				

				}

				@Override
				public void mousePressed(MouseEvent arg0) {
					// TODO Auto-generated method stub
					holding = true;

				}

				@Override
				public void mouseReleased(MouseEvent arg0) {
					// TODO Auto-generated method stub
					if(holding){
						full++;
					}
					

				}

			});
			temp.addMouseListener(new MouseListener() {

				@Override
				public void mouseClicked(MouseEvent arg0) {

				}

				@Override
				public void mouseEntered(MouseEvent arg0) {
					// TODO Auto-generated method stub
					check = true;
					
					

				}

				@Override
				public void mouseExited(MouseEvent arg0) {
					// TODO Auto-generated method stub

				}

				@Override
				public void mousePressed(MouseEvent arg0) {
					// TODO Auto-generated method stub
					temp.setVisible(false);
					

				}

				@Override
				public void mouseReleased(MouseEvent arg0) {
					// TODO Auto-generated method stub
					
					if (check) {
						temp.setVisible(true);
						right.add(temp);
						list.remove(temp);
						deckfin.remove(woo.get(temp.id));
						System.out.println(deckfin.size());
						if(left.getComponentCount()!=20) go.setEnabled(false);
						
					

					} else {
						temp.setVisible(true);
						list.add(temp);
						left.add(temp);
						deckfin.add(woo.get(temp.id));
						//temp.removeAll();
						
						System.out.println(deckfin.size());
						
					}
					if(left.getComponentCount()!=20) go.setEnabled(false);
					else go.setEnabled(true);
					go.addActionListener(new ActionListener(){

						@Override
						public void actionPerformed(ActionEvent arg0) {
							// TODO Auto-generated method stub
						System.exit(0);
							
						}
						
					});
					left.repaint();
					right.repaint();

				}

			});
			right.add(temp);

			track++;
			count++;
		}
		
		ruam.setLayout(new BorderLayout());
		ruam.add(right, BorderLayout.EAST);
		//ruam.setOpaque(false);
		ruam.add(left,BorderLayout.CENTER);
		ruam.add(go,BorderLayout.SOUTH);
		
		

	}