Thursday, October 29, 2015

JavaFx Tutorial For Beginners 6 - Events with JavaFX Scene Builder







package application;
 
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.stage.Stage;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;


public class Main extends Application {
 @Override
 public void start(Stage primaryStage) {
  try {
   //BorderPane root = new BorderPane();

   Parent root = FXMLLoader.load(getClass().getResource("/application/Main.fxml"));
   Scene scene = new Scene(root,400,400);
   scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
   primaryStage.setScene(scene);
   primaryStage.show();
  } catch(Exception e) {
   e.printStackTrace();
  }
 }
 
 public static void main(String[] args) {
  launch(args);
 }
}







package application;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Label;

import java.util.Random;
public class MainController {
 @FXML
    private Label myMessage; 
 public void generateRandom(ActionEvent event) {
  Random rand = new Random();
  int myrand = rand.nextInt(50) + 1;
  myMessage.setText(Integer.toString(myrand));
  //System.out.println(Integer.toString(myrand));
 }
}







<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.layout.AnchorPane?>


<AnchorPane prefHeight="300" prefWidth="500" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.40" fx:controller="application.MainController">
   <children>
      <Button fx:id="clickme" layoutX="213.0" layoutY="202.0" mnemonicParsing="false" onAction="#generateRandom" text="Click me" />
      <Label fx:id="myMessage" layoutX="116.0" layoutY="59.0" prefHeight="112.0" prefWidth="229.0" />
   </children>
</AnchorPane>




Wednesday, October 21, 2015

JavaFx Tutorial For Beginners 4 - How to Use Lambda Expressions to Handl...









import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class HelloWorld extends Application{
 public static void main(String[] args) {
      launch(args);
 }

 @Override
 public void start(Stage primaryStage) throws Exception {
  Button btn = new Button("Click me");
  Button exit = new Button("Exit");
  exit.setOnAction(e -> {
   System.out.println("exit this App");
   System.exit(0);
  });
  btn.setOnAction(new EventHandler<ActionEvent>() {
   
   @Override
   public void handle(ActionEvent event) {
    System.out.println("hello world");
    System.out.println("hello world");
    
   }
  });
  VBox root = new VBox();
  root.getChildren().addAll(btn, exit);
  Scene scene = new Scene(root,500,300); 
  primaryStage.setTitle("My title");
  primaryStage.setScene(scene);
  primaryStage.show();
  
 }
}
























JavaFX 8 Event Handling Examples

Using Lambda Expressions of Java 8 in Java FX

Lambda expressions don't work in Java 8

Implement event handler using Lambda Expression

Java programming with lambda expressions

JavaFx Tutorial For Beginners 3 - How to Create Your First JavaFX Applic...









import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class HelloWorld extends Application{
 public static void main(String[] args) {
      launch(args);
 }

 @Override
 public void start(Stage primaryStage) throws Exception {
  Button btn = new Button("Click me");
  btn.setOnAction(new EventHandler<ActionEvent>() {
   
   @Override
   public void handle(ActionEvent event) {
    System.out.println("hello world");
    
   }
  });
  StackPane root = new StackPane();
  root.getChildren().add(btn);
  Scene scene = new Scene(root,500,300); 
  primaryStage.setScene(scene);
  primaryStage.show();
  
 }
}














Step by Step: How to build your first JavaFX application

Developing a JavaFX Hello World Application

Your First JavaFX Application

Hello World, JavaFX

Getting Started with JavaFX

Searches related to create first javafx application

javafx application examples

javafx application tutorial

javafx application source code

javafx application development

javafx application icon

javafx application thread

javafx tutorial pdf

javafx tutorial eclipse

Thursday, October 15, 2015

HTML5 Tutorial For Beginners 14 # HTML Video Tag









<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Html</title>
</head>
<body>
<video  controls loop muted width="600" height="300" poster="HTML5.png">
  <source src="html5.mp4" type="video/mp4">
</video>
</body>
</html>




Searches related to html video tag

html video tag youtube

html video code

html video tag autoplay

html video player

html video tag controls

html video tag not working

html video tag autoplay loop

html video tag poster

Wednesday, October 14, 2015

HTML5 Tutorial For Beginners 13 # Html5 Section, Header, Footer and Nav









<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Html</title>
<style type="text/css">
header {
    background-color:blue;
    color:white;
    text-align:center;
    padding:6px;
}
nav {
    line-height:40px;
    background-color:yellow;
    height:500px;
    width:100px;
    float:left;
    padding:5px;       
}
section {
    width:350px;
    float:left;
    padding:10px;    
}
footer {
    background-color:blue;
    color:white;
    text-align:center;
    padding:6px;    
    clear:both;
}
</style>
</head>
<body>
<header>
<h1>Tutorial</h1>
</header>

<nav>
C++<br>
Java<br>
C#<br>
</nav>
"WebContent/13 html5 header nav footer and section f.mp4"
<section>
<h2>Code Tutorials</h2>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</p>
</section>

<footer>
Copyright example.com
</footer>
</body>
</html>




















Searches related to html5 section header footer nav

html5 header footer template

html5 header footer example

html5 header footer main

HTML5 section • header • footer

HTML5 section, aside, header, nav, footer elements

Introducing HTML5 footer, header, nav, article, section

Should you use HTML5 header and footer

Tuesday, October 13, 2015

HTML5 Tutorial For Beginners 12 # Using div Tags to Layout header, navig...









<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Html</title>
<style type="text/css">
#header {
    background-color:blue;
    color:white;
    text-align:center;
    padding:6px;
}
#navigation {
    line-height:40px;
    background-color:yellow;
    height:500px;
    width:100px;
    float:left;
    padding:5px;       
}
#section {
    width:350px;
    float:left;
    padding:10px;    
}
#foot {
    background-color:blue;
    color:white;
    text-align:center;
    padding:6px;    
    clear:both;
}
</style>
</head>
<body>
<div id="header">
<h1>Tutorial</h1>
</div>

<div id="navigation">
C++<br>
Java<br>
C#<br>
</div>

<div id="section">
<h2>Code Tutorials</h2>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</p>
</div>

<div id="foot">
Copyright example.com
</div>
</body>
</html>






Searches related to using div tags

using div tags html

using div tags to keep images together

columns using div tags

div means in html

how to create a website using div tags

how do div tags work

div vs span

div formatting

Monday, October 12, 2015

Javascript Tutorial For Beginners 6 # JavaScript Functions







<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Javascript Function</title>
</head>
<body>
<h1 id="demo"></h1>
<h1 id="sum"></h1>
<h1 id="sum1"></h1>
<script type="text/javascript">
/*
function functionName (param1, param2) {
       function body 
}
*/
function printMessage () {
    document.getElementById("demo").innerHTML = "Hello world";
}
function add (num1,num2) {
    return num1+num2;
}
printMessage ();
document.getElementById("sum").innerHTML = add(100,200);
document.getElementById("sum1").innerHTML = add("hello ","world");
</script>
</body>
</html>


















Searches related to javascript function

javascript function onclick

javascript function call

javascript function in html

javascript anonymous function

javascript function list

javascript function apply

calling javascript function from c#

onsubmit javascript function

Sunday, October 11, 2015

Javascript Tutorial For Beginners 5 # If...Else Statements and Compariso...







<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Javascript IF ... ELSE</title>
<script type="text/javascript">
/*
==  is equal to
=== equal value and equal type
!=  is not equal to
!== not equal value or not equal type
>   is greater than
<   is less than
>=  is greater than or equal to
<=  is less than or equal to
*/
var age = 20;
if (age == 18) {
 document.write("the age is == 18");
}
else if (age > 18) {

 document.write("the age is > 18");
}
else {
 document.write("the age is <= to 18");
}
</script>
</head>
<body>
</body>
</html>






OUTPUT


Sunday, October 4, 2015

HTML5 Tutorial For Beginners 11 # HTML Tables











<!DOCTYPE HTML>
<html>
<head>
<title>My HTML</title>
<style type="text/css">
table,th,td {
 border: 1px solid black;
 text-align: left;
}
thead {
 background-color: red;
}
tbody {
 background-color: blue;
}
tfoot {
 background-color: yellow;
}
</style>
</head>
<table style="width: 100%">
<caption> My Name Table</caption>
<thead>
<tr>
<th>Name</th>
<th colspan="2">Marks</th>
</tr>
</thead>
<tbody>
<tr>
<td>Jack</td>
<td>Jackson</td>
<td>90</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Tom</td>
<td>Tomson</td>
<td>80</td>
</tr>
</tfoot>
</table>
</body>
</html>






OUTPUT:

My Name Table
Name Marks
Jack Jackson 90
Tom Tomson 80













Saturday, October 3, 2015

HTML5 Tutorial For Beginners 10 # HTML Lists (Ordered Lists, Unordered L...









<!DOCTYPE HTML>
<html>
<head>
<title>My HTML</title>
<meta name="description"
 content="HTML5 Tutorial For Beginners . Basic Structure of HTML Page.">
<meta name="keywords"
 content="HTML, Htmal5, Tutorials, CSS, XML, XHTML, JavaScript">
<meta name="auther" content="Auther name">
<meta name="robot" content="index,follow">

</head>
<body>
 <ol type="a">
  <li>John</li>
  <li>Tim</li>
  <li>Tom</li>
  <li>Jack</li>
 </ol>
 <ol type="A">
  <li>John</li>
  <li>Tim</li>
  <li>Tom</li>
  <li>Jack</li>
 </ol>
 <ol type="I">
  <li>John</li>
  <li>Tim</li>
  <li>Tom</li>
  <li>Jack</li>
 </ol>
 <ol type="i">
  <li>John</li>
  <li>Tim</li>
  <li>Tom</li>
  <li>Jack</li>
 </ol>
 <ol type="i">
  <li>John</li>
  <ul>
   <li>Tea</li>
   <li>Coffee</li>
  </ul>
  <li>Tim</li>
  <li>Tom</li>
  <li>Jack</li>
 </ol>

 <ul style="list-style-type: none">
  <li>John</li>
  <li>Tim</li>
  <li>Tom</li>
  <li>Jack</li>
 </ul>
 <ul style="list-style-type: square">
  <li>John</li>
  <li>Tim</li>
  <li>Tom</li>
  <li>Jack</li>
 </ul>
 <ul style="list-style-type: desc">
  <li>John</li>
  <li>Tim</li>
  <li>Tom</li>
  <li>Jack</li>
 </ul>
 <ul style="list-style-type: circle">
  <li>John</li>
  <li>Tim</li>
  <li>Tom</li>
  <li>Jack</li>
 </ul>
 <dl>
  <dt>Term</dt>
  <dd>- Description of the term</dd>
  <dt>Term</dt>
  <dd>- Description of the term</dd>
 </dl>

</body>
</html>






OUTPUT





  1. John
  2. Tim
  3. Tom
  4. Jack
  1. John
  2. Tim
  3. Tom
  4. Jack
  1. John
  2. Tim
  3. Tom
  4. Jack
  1. John
  2. Tim
  3. Tom
  4. Jack
  1. John
    • Tea
    • Coffee
  2. Tim
  3. Tom
  4. Jack
  • John
  • Tim
  • Tom
  • Jack
  • John
  • Tim
  • Tom
  • Jack
  • John
  • Tim
  • Tom
  • Jack
  • John
  • Tim
  • Tom
  • Jack
Term
- Description of the term
Term
- Description of the term
















































HTML ol tag

Lists in HTML documents

Lists : Numbered Lists - HTML Tutorial

Lists : Bulleted Lists

 Numbering split lists with HTML attributes

 ol - HTML

Searches related to html lists

html lists examples

html nested lists

html lists style

making lists in html

html lists without bullets

types of lists in html

html tables

html forms

Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com


Stuff I use to make videos

Windows notebook - http://amzn.to/2ADOPrW

Apple MacBook Pro - http://amzn.to/2AC0WG2

Microphone - http://amzn.to/2AC1kV0

notebook mouse - http://amzn.to/2BmeZ2d