public void addfromIndex(String file){
		
		try{
			
			Scanner readFrom =new Scanner(new InputStreamReader 
		            (new FileInputStream(file)));
			if(file.equals("yourindex.txt")){
			if(readFrom.hasNextLine()==false){
				 JOptionPane.showMessageDialog(null, "The file is probably empty.\nPlease click on \"Add to Your Index\" menu","Error",0);
				return ;
			}
			}
			int id=0;
			while(readFrom.hasNextLine()){
			String gg=readFrom.nextLine();
			if(mywords.containsValue(gg.toLowerCase())){
				continue;
			}
			listModel.add(id,gg.toLowerCase());
			mywords.put(id, gg.toLowerCase());
			linkl.add(new Word());
			
			id++;
			}
			this.sortWords();
			gf.setAdd(false);
			gf.setAddIndex(false);
			gf.setmakeIndex(false);
			//this.printLines();
			//this.printWords();
			JOptionPane.showMessageDialog(null, "Words from "+file+" are added to a hashtable successfully :)","Successfully added",1);
			//System.out.println("Words are added to a hashtable successfylly :)");
			readFrom.close();
		}
		catch (IOException e){
			JOptionPane.showMessageDialog(null, "No such file","Error",0);
	    	//System.out.println("No such file");
	    }
	    catch (Exception e) {
	    	JOptionPane.showMessageDialog(null, "Something went wrong on read","Error",0);
	    	//System.out.println("Something went wrong on read");
	    }
	}