private void learningFromDBAction() throws SocketException, IOException, ClassNotFoundException {
			int k = 0;
			String tableName = "";
			String result = "";


			tableName = this.panelDB.tableText.getText();

			if(tableName.equals("")){
				JOptionPane.showMessageDialog(this, "Errore! - Inserire il nome della tabella!");
				return;
			}

			try{
				k = new Integer(panelDB.kText.getText()).intValue();
			}
			catch(NumberFormatException e){
				JOptionPane.showMessageDialog(this, "Errore! - Inserire un valore per k!");
				return;
			}

			out.writeObject(0);
			out.writeObject(tableName);

			result = (String)in.readObject();

			if(!result.equals("OK"))
				JOptionPane.showMessageDialog(this, result);
			else{
				out.writeObject(1);
				out.writeObject(k);

				result = (String)in.readObject();

				if(!result.equals("OK")){
					JOptionPane.showMessageDialog(this, result);
					return;
				} else{


					Integer iter = (Integer)in.readObject();

					panelDB.clusterOutput.setText((String)in.readObject() + "Numero iterate: " + iter + "\n");

					out.writeObject(2);

					result = (String)in.readObject();

					if(!result.equals("OK")){
						JOptionPane.showMessageDialog(this, result);
						return;
					}else{


						out.writeObject(4);
						out.writeObject("db");

						chartAction(this.panelDB);

					}
				}
			}
		}