public SetDeck() {
		try {
			Gson g = new Gson();
			URL url = new URL("http://128.199.235.83/icw/?q=icw/service/all_ic_of&user=624");
			try {
				HashMap<String, ArrayList<Double>> temp = g.fromJson(new InputStreamReader(url.openStream()), HashMap.class );
				ArrayList<Double> cardString = temp.get("data");
				try {
					wallpaper2 = ImageIO.read(new File("wallpaper2.png"));
				} catch (IOException e1) {
					e1.printStackTrace();
				}
				
					cardHolder = new CardHolder(CardHolder.DECK, false);
				
				
				deckHolder = new CardHolder(CardHolder.DECK, false);
				/*
				{
					public void paintComponent(Graphics g){
						super.paintComponent(g);
						g.drawImage(wallpaper2, 0 , 0 ,this.getWidth(), this.getHeight(), this);

					}
				};
				*/
				
				for(int i = 0; i < cardString.size(); i++) {
					cardHolder.add(new Card(cardString.get(i).intValue()));
				}
				url = new URL("http://128.199.235.83/icw/?q=icw/service/get_deck&user=624");
				temp = g.fromJson(new InputStreamReader(url.openStream()), HashMap.class);
				ArrayList<Double> deckString = temp.get("data");
				if(deckString != null) {
					for(int i = 0; i < deckString.size(); i++) {
						deckHolder.add(new Card(deckString.get(i).intValue()));
					}
				}
				DropHandler handler = new DropHandler();
				DropTarget dropTarget = new DropTarget(cardHolder, DnDConstants.ACTION_MOVE, handler, true);
				cardHolder.setPreferredSize(new Dimension(328, 768));
				cardHolder.setLayout(new WrapLayout(FlowLayout.LEFT, 5, 5));
				deckHolder.setPreferredSize(new Dimension(328, 768));
				deckHolder.setLayout(new WrapLayout(FlowLayout.LEFT, 5, 5));
				this.setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
				this.add(new JScrollPane(cardHolder));
				this.add(new JScrollPane(deckHolder));
				JButton submit = new JButton("Submit");
				submit.setFont(new Font("Tahoma", Font.BOLD, 14));
				submit.setForeground(Color.BLACK);
				submit.setBackground(Color.PINK);
				submit.setBounds(600,200,200,200 );
				submit.addActionListener(new ActionListener() {

					@Override
					public void actionPerformed(ActionEvent arg0) {
						// TODO Auto-generated method stub
						JButton b = (JButton) arg0.getSource();
						JPanel panel = (JPanel) b.getParent();
						SetDeck s = (SetDeck) panel.getParent();
						Component [] c = s.deckHolder.getComponents();
						int [] card = new int[c.length];
						for(int i = 0; i < card.length; i++) {
							Card cd = (Card) c[i];
							System.out.println(cd.getSize());
							card[i] = cd.ic_id;
						}
						System.out.println(Arrays.toString(card));

						try {
							String URLString = "http://128.199.235.83/icw/?q=icw/service/set_deck&user=624&pass=90408&deck="+Arrays.toString(card);
							URLString = URLString.replace(" ", "");
							URL dest = new URL(URLString);
							InputStream is = dest.openStream();
					//		is = new URL(url).openStream();
							Gson gs = new Gson();
							JsonObject job = gs.fromJson(new InputStreamReader(is), JsonObject.class);
							System.out.println("STATUS: "+job.get("status").getAsInt());
							System.out.println("MSG: "+job.get("msg").getAsString());
						} catch (IOException e) {
							// TODO Auto-generated catch block
							e.printStackTrace();
						}
						
					}
					
				});

				JPanel display = new JPanel(){
					public void paintComponent(Graphics g){
						super.paintComponent(g);
						g.drawImage(wallpaper2, 0 , 0 ,this.getWidth(), this.getHeight(), this);

					}
				};
				
				display.setPreferredSize(new Dimension(400, 768));
				display.add(submit);
				JButton back = new JButton("Back");
				back.setFont(new Font("Tahoma", Font.BOLD, 14));
				back.setForeground(Color.BLACK);
				back.setBackground(Color.PINK);
				back.setBounds(600,450,200,200 );
				back.addActionListener(new ActionListener() {

					@Override
					public void actionPerformed(ActionEvent arg0) {
						MainMenu.setDeck.dispose();
						Main.main.setVisible(true);
						
					}
					
				});
				display.add(back);
				this.add(display);
				
				
			} catch (JsonSyntaxException | JsonIOException | IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}