Javafx Outlook Demo || Javafx || Nebeans || SceneBuilder
FXMLDocument.fxml
<?xml version="1.0" encoding="UTF-8"?><?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.scene.Cursor?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<BorderPane fx:id="root" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="1134.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="javafx.outlook.mail.demo.FXMLDocumentController">
<left>
<HBox prefHeight="600.0" prefWidth="268.0" BorderPane.alignment="CENTER">
<children>
<Pane fx:id="panel_1" prefHeight="600.0" prefWidth="270.0" styleClass="panel_1" stylesheets="@style.css">
<children>
<ImageView fitHeight="52.0" fitWidth="50.0" layoutX="42.0" layoutY="23.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/icons8_microsoft_outlook_50px.png" />
</image>
</ImageView>
<Label layoutX="103.0" layoutY="41.0" text="Outlook" textFill="#f8f6f6">
<font>
<Font name="Comic Sans MS Bold" size="24.0" />
</font>
</Label>
<Pane layoutX="-5.0" layoutY="87.0" prefHeight="518.0" prefWidth="273.0">
<children>
<JFXButton layoutX="6.0" layoutY="45.0" prefHeight="48.0" prefWidth="267.0" styleClass="button_1" text=" Inbox" textFill="#ebebeb">
<font>
<Font size="15.0" />
</font>
<graphic>
<ImageView fx:id="imageview" accessibleRole="BUTTON" fitHeight="45.0" fitWidth="39.0" pickOnBounds="true" preserveRatio="true" styleClass="imageview">
<image>
<Image url="@../../../../icons/icons8_new_post_50px_2.png" />
</image>
</ImageView>
</graphic>
</JFXButton>
<JFXButton layoutY="104.0" prefHeight="48.0" prefWidth="267.0" styleClass="button_1" text=" Sent" textFill="#ebebeb">
<font>
<Font size="15.0" />
</font>
<graphic>
<ImageView accessibleRole="BUTTON" fitHeight="45.0" fitWidth="39.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/icons8_paper_plane_50px.png" />
</image>
</ImageView>
</graphic>
</JFXButton>
<JFXButton layoutY="169.0" prefHeight="48.0" prefWidth="267.0" styleClass="button_1" text="Outbox" textFill="#ebebeb">
<font>
<Font size="15.0" />
</font>
<graphic>
<ImageView accessibleRole="BUTTON" fitHeight="45.0" fitWidth="39.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/icons8_mail_error_50px.png" />
</image>
</ImageView>
</graphic>
</JFXButton>
<JFXButton layoutY="228.0" prefHeight="48.0" prefWidth="267.0" styleClass="button_1" text=" Spam" textFill="#ebebeb">
<font>
<Font size="15.0" />
</font>
<graphic>
<ImageView accessibleRole="BUTTON" fitHeight="45.0" fitWidth="39.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/icons8_spam_50px_1.png" />
</image>
</ImageView>
</graphic>
</JFXButton>
<JFXButton layoutY="292.0" prefHeight="48.0" prefWidth="267.0" styleClass="button_1" text=" Draft" textFill="#ebebeb">
<font>
<Font size="15.0" />
</font>
<graphic>
<ImageView accessibleRole="BUTTON" fitHeight="45.0" fitWidth="39.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/icons8_postal_50px_1.png" />
</image>
</ImageView>
</graphic>
</JFXButton>
<JFXButton contentDisplay="GRAPHIC_ONLY" layoutX="87.0" layoutY="418.0" onMouseClicked="#exit" prefHeight="36.0" prefWidth="59.0" text=" Draft" textFill="#ebebeb">
<font>
<Font size="15.0" />
</font>
<graphic>
<ImageView accessibleRole="BUTTON" fitHeight="45.0" fitWidth="39.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/icons8_male_user_50px.png" />
</image>
</ImageView>
</graphic>
</JFXButton>
</children>
</Pane>
</children>
</Pane>
</children>
</HBox>
</left>
<center>
<Pane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER">
<children>
<JFXTextField layoutX="14.0" layoutY="14.0" maxWidth="302.0" minWidth="231.0" prefHeight="19.0" prefWidth="302.0" promptText=" Search a Chat" styleClass="text-field" stylesheets="@style.css" unFocusColor="#f5f0f0" />
<JFXButton contentDisplay="GRAPHIC_ONLY" layoutX="776.0" layoutY="27.0" prefHeight="46.0" prefWidth="31.0" text=" Draft" textFill="#ebebeb">
<font>
<Font size="15.0" />
</font>
<graphic>
<ImageView accessibleRole="BUTTON" fitHeight="45.0" fitWidth="39.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/icons8_male_user_50px.png" />
</image>
</ImageView>
</graphic>
</JFXButton>
<JFXButton contentDisplay="GRAPHIC_ONLY" layoutX="726.0" layoutY="27.0" prefHeight="46.0" prefWidth="31.0" text=" Draft" textFill="#ebebeb">
<font>
<Font size="15.0" />
</font>
<graphic>
<ImageView accessibleRole="BUTTON" fitHeight="45.0" fitWidth="39.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/icons8_settings_50px.png" />
</image>
</ImageView>
</graphic>
</JFXButton>
<JFXButton contentDisplay="GRAPHIC_ONLY" layoutX="674.0" layoutY="27.0" prefHeight="36.0" prefWidth="59.0" text=" Draft" textFill="#ebebeb">
<font>
<Font size="15.0" />
</font>
<graphic>
<ImageView accessibleRole="BUTTON" fitHeight="45.0" fitWidth="39.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/icons8_calendar_31_50px.png" />
</image>
</ImageView>
</graphic>
</JFXButton>
<JFXButton contentDisplay="GRAPHIC_ONLY" layoutX="623.0" layoutY="27.0" prefHeight="36.0" prefWidth="59.0" text=" Draft" textFill="#ebebeb">
<font>
<Font size="15.0" />
</font>
<graphic>
<ImageView accessibleRole="BUTTON" fitHeight="45.0" fitWidth="39.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/icons8_notification_50px.png" />
</image>
</ImageView>
</graphic>
</JFXButton>
<JFXButton contentDisplay="GRAPHIC_ONLY" layoutX="14.0" layoutY="17.0" prefHeight="36.0" prefWidth="59.0" text=" Draft" textFill="#ebebeb">
<font>
<Font size="15.0" />
</font>
<graphic>
<ImageView accessibleRole="BUTTON" fitHeight="32.0" fitWidth="37.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/icons8_search_50px.png" />
</image>
</ImageView>
</graphic>
</JFXButton>
<JFXButton contentDisplay="GRAPHIC_ONLY" layoutX="257.0" layoutY="76.0" prefHeight="37.0" prefWidth="37.0" style="-fx-background-color: #2E72C3;" text=" Draft" textFill="#ebebeb">
<font>
<Font size="15.0" />
</font>
<graphic>
<ImageView accessibleRole="BUTTON" fitHeight="31.0" fitWidth="29.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/icons8_add_message_50px.png" />
</image>
</ImageView>
</graphic>
</JFXButton>
<HBox layoutY="134.0" prefHeight="464.0" prefWidth="378.0">
<children>
<Pane prefHeight="464.0" prefWidth="380.0">
<children>
<Pane layoutX="-1.0" layoutY="-2.0" prefHeight="99.0" prefWidth="381.0">
<children>
<ImageView fitHeight="64.0" fitWidth="70.0" layoutX="14.0" layoutY="20.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/portrait-white-man-isolated_53876-40306.jpg" />
</image>
</ImageView>
<Label layoutX="91.0" layoutY="24.0" prefHeight="24.0" prefWidth="266.0" text="Wellcome to Material Ui Java">
<font>
<Font name="Comic Sans MS Bold" size="17.0" />
</font>
</Label>
<Label layoutX="91.0" layoutY="41.0" prefHeight="48.0" prefWidth="266.0" text="lorem isparm,wellcome to new world of material ui javafx">
<font>
<Font name="Comic Sans MS" size="14.0" />
</font>
</Label>
</children>
<cursor>
<Cursor fx:constant="OPEN_HAND" />
</cursor>
</Pane>
<Pane layoutX="-1.0" layoutY="97.0" prefHeight="99.0" prefWidth="381.0">
<children>
<ImageView fitHeight="64.0" fitWidth="70.0" layoutX="14.0" layoutY="20.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/0.jpg" />
</image>
</ImageView>
<Label layoutX="91.0" layoutY="24.0" prefHeight="24.0" prefWidth="266.0" text="News letter from codingHub">
<font>
<Font name="Comic Sans MS Bold" size="17.0" />
</font>
</Label>
<Label layoutX="91.0" layoutY="41.0" prefHeight="48.0" prefWidth="266.0" text="lorem isparm,wellcome to new world of material ui javafx">
<font>
<Font name="Comic Sans MS" size="14.0" />
</font>
</Label>
</children>
<cursor>
<Cursor fx:constant="OPEN_HAND" />
</cursor>
</Pane>
<Pane layoutX="-1.0" layoutY="196.0" prefHeight="99.0" prefWidth="381.0">
<children>
<ImageView fitHeight="64.0" fitWidth="70.0" layoutX="14.0" layoutY="20.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/coursera-logo-square.jpg" />
</image>
</ImageView>
<Label layoutX="91.0" layoutY="24.0" prefHeight="24.0" prefWidth="266.0" text="Thanks for signup on coursera">
<font>
<Font name="Comic Sans MS Bold" size="17.0" />
</font>
</Label>
<Label layoutX="91.0" layoutY="41.0" prefHeight="48.0" prefWidth="266.0" text="lorem isparm,wellcome to new world of material ui javafx">
<font>
<Font name="Comic Sans MS" size="14.0" />
</font>
</Label>
</children>
<cursor>
<Cursor fx:constant="OPEN_HAND" />
</cursor>
</Pane>
<Pane layoutX="-1.0" layoutY="295.0" prefHeight="99.0" prefWidth="381.0">
<children>
<ImageView fitHeight="64.0" fitWidth="70.0" layoutX="14.0" layoutY="20.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/0%20(1).jpg" />
</image>
</ImageView>
<Label layoutX="91.0" layoutY="24.0" prefHeight="24.0" prefWidth="266.0" text="Test mail form fluraisight">
<font>
<Font name="Comic Sans MS Bold" size="17.0" />
</font>
</Label>
<Label layoutX="91.0" layoutY="41.0" prefHeight="48.0" prefWidth="266.0" text="lorem isparm,wellcome to new world of material ui javafx">
<font>
<Font name="Comic Sans MS" size="14.0" />
</font>
</Label>
</children>
<cursor>
<Cursor fx:constant="OPEN_HAND" />
</cursor>
</Pane>
</children>
</Pane>
</children>
</HBox>
<ImageView fitHeight="246.0" fitWidth="317.0" layoutX="460.0" layoutY="155.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../../icons/YPP%20Grow%20with%20YouTube.jpg" />
</image>
</ImageView>
<Label layoutX="444.0" layoutY="410.0" prefHeight="36.0" prefWidth="358.0" text="Wellcome to Material Ui Java">
<font>
<Font name="Comic Sans MS Bold" size="24.0" />
</font>
</Label>
<Label alignment="CENTER" layoutX="510.0" layoutY="446.0" prefHeight="48.0" prefWidth="266.0" text="lorem isparm,wellcome to new world of material ui javafx">
<font>
<Font name="Comic Sans MS" size="14.0" />
</font>
</Label>
</children>
</Pane>
</center>
</BorderPane>
style.css
* {-fx-primary : #ffffff;
-fx-secondary : #FFFF8D;
-fx-primarytext : #212121;
-fx-blue: #1976D2;
-fx-red: #FF0000;
-fx-color-1:#1976D2;
}
.button_1:hover, .button_1:focused{
-fx-background-color: -fx-primarytext;
-fx-text-fill: white;
-fx-border-radius: 50px;
-fx-background-radius: 50px;
}
.text-field
{
-fx-border-radius: 50px;
-fx-background-radius: 50px;
-fx-text-fill: -fx-primarytext;
-fx-font-family:Georgia;
-fx-font-size : 16pt;
-fx-focus-color: -fx-primary;
-fx-text-fill: derive(black, 10%);
}
.panel_1{
-fx-background-color: #2F71C2;
}
FXMLDocumentController.java
package javafx.outlook.mail.demo;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Pane;
public class FXMLDocumentController implements Initializable {
private Label label;
@FXML
private BorderPane root;
@FXML
private Pane panel_1;
@FXML
private ImageView imageview;
private void handleButtonAction(ActionEvent event) {
System.out.println("You clicked me!");
label.setText("Hello World!");
}
@Override
public void initialize(URL url, ResourceBundle rb) {
// TODO
}
@FXML
private void exit(MouseEvent event) {
System.exit(0);
}
}
JavafxOutlookMailDemo.java
package javafx.outlook.mail.demo;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
public class JavafxOutlookMailDemo extends Application {
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml"));
Scene scene = new Scene(root);
stage.initStyle(StageStyle.TRANSPARENT);
stage.setScene(scene);
stage.show();
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
launch(args);
}
}
Comments
Post a Comment