8b. Without writing any code, build a GUI that display text in label and image in an ImageView (use JavaFX).

import javafx.application.Application; 

import javafx.scene.Scene; 

import javafx.scene.layout.StackPane; 

import javafx.scene.text.Text; 

import javafx.stage.Stage; 

public class TextExample extends Application
{ 

    public void start(Stage primaryStage) throws Exception 
    { 

        // TODO Auto-generated method stub 

        Text text = new Text(); 

        text.setText("Hello !! Welcome to JavaTPoint"); 

        StackPane root = new StackPane(); 

        Scene scene = new Scene(root,300,400); 

        root.getChildren().add(text); 

        primaryStage.setScene(scene); 

        primaryStage.setTitle("Text Example"); 

        primaryStage.show(); 

    } 

    public static void main(String[] args) 
    { 

        launch(args); 

    } 

} 

No comments

9.C Write a java program to connect to a database using JDBC and delete values from it.

 import java.sql.*;  public class result  {        public static void main(String[] args)      {          Connection con=null;       ...