Connect with Peer Bloggers

Get your Bloggers ID and network with best bloggers around the world.

2

Calculate the power of a number in Java

Java Buddy ― To calculate the result of "power of number" in Java, calling the method:static double pow(double a, double b)It returns the value of the first argument (a) raised to the power of the second argument (b).Reference: java.lang.MathPS. ^ operator in... (more)
 Java Buddy ― Posted 2 days ago
2
Create TilePane using FXML

Create TilePane using FXML

Java Buddy ― <?xml version="1.0" encoding="UTF-8"?><?import java.lang.*?><?import javafx.scene.*?><?import javafx.scene.control.*?><?import javafx.scene.layout.*?><?import javafx.scene.image.*?><TilePane fx:controller=... (more)
 Java Buddy ― Posted 2 days ago
2
TilePane in vertical

TilePane in vertical

Java Buddy ― package javafx_tilepane;import javafx.application.Application;import javafx.geometry.Orientation;import javafx.scene.Scene;import javafx.scene.image.ImageView;import javafx.scene.layout.TilePane;import javafx.stage.Stage;/** * * @web http://java... (more)
Tags: code snap, JavaFX
 Java Buddy ― Posted 2 days ago
2
Create TilePane using Java code

Create TilePane using Java code

Java Buddy ― javafx.scene.layout.TilePane lays out its children in a grid of uniformly sized "tiles".package javafx_tilepane;import javafx.application.Application;import javafx.scene.Scene;import javafx.scene.image.ImageView;import javafx.scene.layout.TilePane... (more)
Tags: code snap, JavaFX
 Java Buddy ― Posted 2 days ago
2
Create StackPane using FXML

Create StackPane using FXML

Java Buddy ― javafx.scene.layout.StackPane lays out its children in a back-to-front stack.The z-order of the children is defined by the order of the children list with the 0th child being the bottom and last child on top. If a border and/or padding have been set,... (more)
 Java Buddy ― Posted 2 days ago
2
Create AnchorPane using FXML

Create AnchorPane using FXML

Java Buddy ― javafx.scene.layout.AnchorPane allows the edges of child nodes to be anchored to an offset from the anchorpane's edges. If the anchorpane has a border and/or padding set, the offsets will be measured from the inside edge of those insets.Modify Sample... (more)
 Java Buddy ― Posted 4 days ago
2
Create FlowPane using FXML

Create FlowPane using FXML

Java Buddy ― javafx.scene.layout.FlowPane lays out its children in a flow that wraps at the flowpane's boundary.Modify Sample.fxml in the last article "Create GridPane using FXML" to replace GridPane with FlowPane. Default orientation in "horizontal".<?xml... (more)
 Java Buddy ― Posted 6 days ago
3
Create BorderPane using FXML

Create BorderPane using FXML

Java Buddy ― javafx.scene.layout.BorderPane lays out children in top, left, right, bottom, and center positions.By using FXML, we can change the visual view without touch the Java code.Modify Sample.fxml in the last article "Create GridPane using FXML" to replace... (more)
 Java Buddy ― Posted 7 days ago
4
Create GridPane using FXML

Create GridPane using FXML

Java Buddy ― javafx.scene.layout.GridPane lays out its children within a flexible grid of rows and columns. Modify Sample.fxml and Sample.java from the auto generated files described in the article "JavaFX FXML Application".Sample.fxml<?xml version="1.0"... (more)
 Java Buddy ― Posted 7 days ago
3

Introduce JavaFX Scene Builder

Java Buddy ― JavaFX Scene Builder is a design tool that enables you to drag and drop graphical user interface (GUI) components onto a JavaFX scene. It can help you to quickly prototype interactive applications that connect GUI components to the application logic.... (more)
Tags: tools, how to, FXML
 Java Buddy ― Posted 7 days ago
2
JavaFX FXML Application

JavaFX FXML Application

Java Buddy ― FXML is a scriptable, XML-based markup language for constructing Java object graphs. It provides a convenient alternative to constructing such graphs in procedural code, and is ideally suited to defining the user interface of a JavaFX application,... (more)
Tags: JavaFX, how to, FXML
 Java Buddy ― Posted 9 days ago
3
Preview HTMLEditor content in WebView

Preview HTMLEditor content in WebView

Java Buddy ― We can load content of HTMLEditor in WebView using loadContent() method of WebEngine.package javafx_html;import javafx.application.Application;import javafx.event.ActionEvent;import javafx.event.EventHandler;import javafx.scene.Group;import javafx... (more)
Tags: code snap, JavaFX
 Java Buddy ― Posted 10 days ago
3
Load file to HTMLEditor

Load file to HTMLEditor

Java Buddy ― Last article explain how to "Read text file with JavaFX FileChooser". It's added in the code of previous article "Save HTMLEditor generated code in file", to add the function of loading file to HTMLEditor.package javafx_html;import java.io.*;import... (more)
Tags: code snap, JavaFX
 Java Buddy ― Posted 11 days ago
4
Read text file with JavaFX FileChooser

Read text file with JavaFX FileChooser

Java Buddy ― Example to choose and read text file with JavaFX FileChooser.package javafxfilechooser;import java.io.*;import java.util.logging.Level;import java.util.logging.Logger;import javafx.application.Application;import javafx.event.ActionEvent;import javafx... (more)
Tags: code snap, JavaFX
 Java Buddy ― Posted 12 days ago
3

Read text file using Java code

Java Buddy ― Example to read text from file:package javafile;import java.io.*;import java.util.logging.Level;import java.util.logging.Logger;/** * * @web http://java-buddy.blogspot.com/ */public class ReadStringFromFile { public static void main(String[]... (more)
 Java Buddy ― Posted 13 days ago