import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class Cart extends Application {
private String[] items = {"Potato", "Egg", "Chicken", "Milk", "Bread"};
private VBox centerPane;
private TextArea output;
@Override
public void start(Stage primaryStage) {
BorderPane root = new BorderPane();
Scene scene = new Scene(root,600,500);
centerPane = new VBox(20);
centerPane.setPadding(new Insets(20, 20,20, 20));
centerPane.setAlignment(Pos.CENTER);
root.setCenter(centerPane);
output = new TextArea();
output.setEditable(false);
HBox outputpane = new HBox(10, output);
outputpane.setAlignment(Pos.CENTER);
outputpane.setPadding(new Insets(25, 25, 25, 25));
centerPane.getChildren().add(output);
root.setBottom(outputpane);
primaryStage.setTitle("CART");
primaryStage.setScene(scene);
primaryStage.show();
primaryStage.setOnAction(setTitle("CART"));
primaryStage.setOnAction(setScene(scene));
primaryStage.setOnAction(setScene(scene));
primaryStage.show();
}
public static void main(String[] args)
{
launch(args);
}
}
void addToCart()
{
String pName;
int found=0;
System.out.println("Enter Product/Item Name :: ");
pName=s1.next();
Iterator
i=a1.iterator();
Set s=hm.entrySet();
Iterator i1=s.iterator();
while(i.hasNext())
{
Product...