private void HangmanwithPicture() {      
       try { 
               URL url = new URL(URI1+"hangman/hanged0.jpg");
               BufferedImage img = ImageIO.read(url);
               Icon icon=new ImageIcon(img);   
               jLabel10.setIcon(icon);
            } catch (IOException e) {System.out.println(e);}
       jLabel10.setVisible(true);
       jLabel2.setVisible(true);
        
       jTextField2.setText("Επέλεξε ένα γράμμα!");
       HangmanActivate();
       word=""; word2="";  word4=""; word6=""; word8=""; word9="";count=0;
       jTextField1.setHorizontalAlignment(JTextField.CENTER);
       jTextField2.setHorizontalAlignment(JTextField.CENTER);
       jTextField5.setHorizontalAlignment(JTextField.CENTER);

       ReadFromFile GetData = new ReadFromFile();
       String[][] selection;
       int index,nextInt,question1,answer1;

       selection = GetData.Selection1(data);
       index = GetData.index();
       String selectedcategory=GetData.selectedcategory();
       jLabel28.setText("Κατηγορία: "+selectedcategory);
       Category[num]=selectedcategory;
       
       Random generator = new Random();
       question1=1;       
       answer1=0;
       String warning="Ο σύνδεσμος που περιέχει την εικόνα: ";
       
       int play;
       do {
                 nextInt = generator.nextInt(index);
                  play=0;
                  String check=selection[nextInt][0];
                  int length1 = check.length();
                  check=check.toUpperCase();
                  char [] array2check=check.toCharArray();
                  for (int s=0;s<length1;s++)  
                      if (array2check[s]>='Α' &&  array2check[s]<='Ω') play++; 
             } while (nextInt==0 || play==0);   
      
       try { 
               URL url = new URL(selection[nextInt][1]);
               BufferedImage img = ImageIO.read(url);
               java.awt.Image img2=img.getScaledInstance(240,140,BufferedImage.SCALE_SMOOTH);
               Icon icon=new ImageIcon(img2);   
               jLabel2.setIcon(icon);
            } catch (IOException e) {
                  jLabel2.setText("Εικόνα:"+selection[nextInt][0]);
                  JOptionPane.showMessageDialog(this, warning+selection[nextInt][0]+" δε λειτουργεί!");
               }
             
       frozen=false;
       String str;
       int fps = 0;
       str = getParameter("fps");
       try { 
            if (str != null) {
                fps = Integer.parseInt(str);
            }
       } catch (Exception e) {}

       int delay = (fps > 0) ? (1000 / fps) : 1000;
       timer = new Timer(delay, this);
       timer.setInitialDelay(0);
       timer.setCoalesce(true);
       startAnimation();
       
       jTextField1.setText(selection[0][question1]);
       wordold=selection[nextInt][answer1];
       len = wordold.length();
       wordold=wordold.replace('ΐ', 'ι');
       wordold=wordold.replace('ΰ', 'υ');
       wordnew=wordold.toUpperCase();
       wordarray=wordnew.toCharArray();
      
       for (int i = 0; i < len; i++) {
            if (wordarray[i]=='Ά') {wordarray[i]='Α';}
            if (wordarray[i]=='Έ') {wordarray[i]='Ε';}
            if (wordarray[i]=='Ή') {wordarray[i]='Η';}
            if (wordarray[i]=='Ί') {wordarray[i]='Ι';}
            if (wordarray[i]=='Ό') {wordarray[i]='Ο';}
            if (wordarray[i]=='Ύ') {wordarray[i]='Υ';}
            if (wordarray[i]=='Ώ') {wordarray[i]='Ω';}
            if (wordarray[i]=='Ϊ') {wordarray[i]='Ι';}
            if (wordarray[i]=='Ϋ') {wordarray[i]='Υ';}
       }
            
       for (int i = 0; i < len; i++)  word = word+wordarray[i];
       word3=word;
       for (int i = 0; i < len; i++)  word4 = word4+ "*";
       word5= new char[len];   
       word7= new char[len];   
       word5 = word.toCharArray();
       word7 = word.toCharArray();
       for (int i = 0; i < len; i ++) 
             if ((word7[i]>='Α')&&(word7[i]<='Ω'))  word7[i] = '_';
       for (int i = 0; i < len; i++)  word8 = word8+word7[i]+' ';
       
       if (word8.length()>185) jTextField5.setFont(new java.awt.Font("Tahoma", 1, 8));
       else if (word8.length()>145) jTextField5.setFont(new java.awt.Font("Tahoma", 1, 10));       
       else if (word8.length()>135) jTextField5.setFont(new java.awt.Font("Tahoma", 1, 12));
       else if (word8.length()>121) jTextField5.setFont(new java.awt.Font("Tahoma", 1, 14));
       else if (word8.length()>117) jTextField5.setFont(new java.awt.Font("Tahoma", 1, 16));
       else jTextField5.setFont(new java.awt.Font("Tahoma", 1, 18));
       jTextField5.setText(word8);
       
       quest=selection[nextInt][0];
       dbpedia=selection[nextInt][2];
       wiki=selection[nextInt][3];
       question[num]="Η ερώτηση ήταν: "+selection[0][question1] +selection[nextInt][question1]+";";
       answer[num]="Η σωστή απάντηση ήταν: " +selection[nextInt][answer1];
       
    }