Posts

Showing posts from September, 2022

How to solve a Quadratic Equation in Java

Image
package quardatic_equcation; /**  *  * @author IPHONE14  */ public class Quardatic_equcation {     /**      * @param args the command line arguments      */     public static void main(String[] args) {         //progtram to calculate quardatic equcation in java programming language        double a = 2.3, b = 4, c = 5.6;        double root_1, root_2;                double determinant = b *b -4*a*c;        if(determinant>0){            root_1 = (-b+Math.sqrt(determinant))/(2*a);            root_2 = (-b+Math.sqrt(determinant))/(2*a);            System.out.format("root_1 = %.2f and root_2 = %.2f", root_1,root_2);                    }else if(determinant == 0){   ...

How to create Modern Todo GUI Using JavaFX and SceneBuilder

Image
FXML <?xml version="1.0" encoding="UTF-8"?> <?import com.jfoenix.controls.JFXButton?> <?import javafx.geometry.Insets?> <?import javafx.scene.control.Label?> <?import javafx.scene.control.Tab?> <?import javafx.scene.control.TabPane?> <?import javafx.scene.control.TableColumn?> <?import javafx.scene.control.TableView?> <?import javafx.scene.image.Image?> <?import javafx.scene.image.ImageView?> <?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.BorderPane?> <?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.VBox?> <?import javafx.scene.text.Font?> <?import javafx.scene.text.Text?> <BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="679.0" prefWidth="1047.0" stylesheets="@style.css" xmlns="http://javafx.com/...

JavaFX UI Design SignIn -SignUp Example

Image
  main java package charity_ui; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; /**  *  * @author Administrator  */ public class Charity_Ui extends Application {          @Override     public void start(Stage stage) throws Exception {         Parent root = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml"));                  Scene scene = new Scene(root);                  stage.setScene(scene);         stage.show();     }     /**      * @param args the command line arguments      */     public static void main(String[] args) {         launch(args);     }      } FXML <?xml version="1.0" en...