private void SetItem() {	
		if (!jtfTitle.getText().isEmpty())
			title = jtfTitle.getText();
			
		if (!jtfAuthor.getText().isEmpty())
			author = jtfAuthor.getText();
		
		try  {
		if (!jtfRating.getText().isEmpty()) 
			rating = Integer.valueOf(jtfRating.getText());
		
		if (jtfLength.getText().isEmpty())
			length = Double.valueOf(jtfLength.getText());
		} catch (NumberFormatException e) {
			System.err.print("Input must be a number");
		}
		
		if (!jtfGenre.getText().isEmpty())
			genre = jtfGenre.getText();
		
		try {
		switch (type) {
		case BOOK : Archive.instance.setItem(new Book(title, author, length, genre, rating, type), index); break;
		case MUSIC : Archive.instance.setItem(new Music(title, author, length, genre, rating, type), index); break;
		}
		}
		catch (IllegalItemException e) {
			System.err.println("Illegal type");
		}
		ListPanel.updateList();
		Archive.instance.setSaved(false);
		dispose();
	}