package ui;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class UserView extends Application {
	
	Stage stage; // the window
	Scene scene; // the main content in the window

	@Override
	public void start(Stage primaryStage) throws Exception {
		stage = primaryStage;
		stage.setTitle("First window for NLIDB");
		
		Label label1 = new Label("Welcome!");
		
		StackPane layout = new StackPane();
		layout.getChildren().add(label1);
		
		scene = new Scene(layout, 300, 200);
		
		stage.setScene(scene);
		stage.show();
	}
	

}

@@ -6,16 +6,39 @@
 ge ui;%0A%0A
+import app.Controller;%0A
 import j
@@ -127,51 +127,121 @@
 rol.
-Label;%0Aimport javafx.scene.layout.StackPane
+Button;%0Aimport javafx.scene.control.Label;%0Aimport javafx.scene.control.TextField;%0Aimport javafx.scene.layout.VBox
 ;%0Aim
@@ -387,16 +387,34 @@
 e window
+%0A%09Controller ctrl;
 %0A%0A%09@Over
@@ -476,16 +476,43 @@
 ption %7B%0A
+%09%09ctrl = new Controller();%0A
 %09%09stage 
@@ -549,15 +549,9 @@
 le(%22
-First w
+W
 indo
@@ -607,87 +607,695 @@
 come
-!%22);%0A%09%09%0A%09%09StackPane layout = new StackPane
+ to Natural Language Interface to DataBase!%22);%0A%09%09%0A%09%09Label lblInput = new Label(%22Natural Language Input:%22);%0A%09%09TextField fieldIn = new TextField();%0A%09%09fieldIn.setPrefHeight(100);%0A%09%09%0A%09%09Button btnTranslate = new Button(%22translate%22);%0A%0A%09%09Label lblSQL = new Label(%22SQL query:%22);%0A%09%09TextField fieldSQL = new TextField();%0A%09%09fieldSQL.setPrefHeight(100);%0A%09%09%0A%09%09// Define action of the translate button.%0A%09%09btnTranslate.setOnAction(e -%3E %7B%0A%09%09%09String queryMsg = ctrl.processNaturalLanguage(fieldIn.getText()).get
 ();%0A%09%09
-layout.getChildren().add(label1
+%09fieldSQL.setText(queryMsg);%0A%09%09%7D);%0A%09%09%0A%09%09VBox vb = new VBox();%0A%09%09vb.setSpacing(10);%0A%09%09vb.getChildren().addAll(%0A%09%09%09%09label1,%0A%09%09%09%09lblInput,fieldIn,%0A%09%09%09%09btnTranslate,%0A%09%09%09%09lblSQL, fieldSQL%0A%09%09%09%09
 );%0A%09
@@ -1320,23 +1320,19 @@
 ene(
-layout, 3
+vb, 6
 00, 
-20
+45
 0);%0A

add basic user input control