Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package sample;
- import java.util.Scanner;
- import javafx.application.Application;
- import javafx.fxml.FXMLLoader;
- import javafx.scene.Cursor;
- import javafx.scene.control.Hyperlink;
- import javafx.scene.control.skin.LabeledSkinBase;
- import javafx.scene.image.Image;
- import javafx.scene.image.ImageView;
- import javafx.scene.layout.HBox;
- import javafx.scene.layout.StackPane;
- import javafx.scene.control.TextField;
- import javafx.scene.Scene;
- import javafx.scene.control.Button;
- import javafx.scene.control.Label;
- import javafx.scene.layout.VBox;
- import javafx.stage.Stage;
- import org.w3c.dom.html.HTMLObjectElement;
- import javax.swing.text.TabExpander;
- import java.io.FileInputStream;
- public class suface extends Application {
- public static void main(String[] args) {
- launch(args);
- }
- @Override
- public void start(Stage primaryStage) {
- Label name = new Label("Name : ");
- Label address = new Label("Adrress : ");
- Label label = new Label(" ");
- Label label2 = new Label(" ");
- Label label3 = new Label(" ");
- TextField text1 = new TextField();
- text1.setPrefWidth(800);
- TextField text2 = new TextField();
- text2.setPrefWidth(800);
- Button button1 = new Button("Submit");
- button1.setPrefWidth(100);
- HBox box1 = new HBox(label2 ,button1);
- HBox box2 = new HBox(name ,text1);
- HBox box3 = new HBox(address ,text2);
- TextField bigtext = new TextField();
- bigtext.setPrefWidth(800);
- bigtext.setPrefHeight(400);
- Label side = new Label(" ");
- HBox box4 = new HBox( side,bigtext);
- Label one = new Label(" ");
- Label llablel = new Label(" ");
- TextField last = new TextField();
- Label lastl = new Label(" ");
- Label lastll = new Label(" ");
- Button lbut = new Button("Bye!");
- lbut.setPrefWidth(100);
- HBox lbox = new HBox(lastl ,last ,lastll ,lbut);
- Label nname = new Label(" Your Name is : ");
- Label nname1 = new Label();
- HBox onemore = new HBox(nname ,nname1);
- Label naddress = new Label(" Your Address is : ");
- Label naddress1 = new Label();
- HBox lastone = new HBox(naddress ,naddress1);
- button1.setOnAction(e->{
- String l = text1.getText();
- String ll = text1.getText();
- nname1.setText(l);
- naddress1.setText(ll);
- });
- VBox box = new VBox(box2 ,label ,box3 ,label3 ,box1 ,one ,box4 ,llablel ,lbox ,onemore ,lastone);
- Scene scene = new Scene(box);
- Stage stage = new Stage();
- stage.setTitle("Surface");
- stage.setWidth(1000);
- stage.setHeight(1100);
- stage.setScene(scene);
- //stage.setFullScreen(true);
- stage.show();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement