Styling a JavaFX 2 button using FXML only – How to add an image to a button?

Solution using only fxml As tarrsalah points out, css is the recommended way of doing this, though you can also do it in fxml if you prefer: <?import java.lang.*?> <?import java.util.*?> <?import javafx.scene.control.*?> <?import javafx.scene.image.*?> <?import javafx.scene.layout.*?> <?import javafx.scene.paint.*?> <?import javafx.scene.text.*?> <AnchorPane id=”AnchorPane” maxHeight=”-Infinity” maxWidth=”-Infinity” minHeight=”-Infinity” minWidth=”-Infinity” prefHeight=”400.0″ prefWidth=”600.0″ xmlns:fx=”http://javafx.com/fxml”> <children> <Button layoutX=”104.0″ layoutY=”81.0″ mnemonicParsing=”false” … Read more

reading text file with utf-8 encoding using java

Use import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; public class test { public static void main(String[] args){ try { File fileDir = new File(“PATH_TO_FILE”); BufferedReader in = new BufferedReader( new InputStreamReader(new FileInputStream(fileDir), “UTF-8”)); String str; while ((str = in.readLine()) != null) { System.out.println(str); } in.close(); } catch (UnsupportedEncodingException e) { … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)