Skip to content

Instantly share code, notes, and snippets.

View nezarjhons's full-sized avatar
🎯
Focusing

nezar nezarjhons

🎯
Focusing
View GitHub Profile
@omernaci
omernaci / ScreenResolutionDemo.java
Created April 19, 2017 05:56
JavaFX Scene Size with Screen Resolution
import java.awt.Dimension;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
public class ScreenResolutionDemo extends Application {
public class VirtualKeyboard {
private final VBox root ;
/**
* Creates a Virtual Keyboard.
* @param target The node that will receive KeyEvents from this keyboard.
* If target is null, KeyEvents will be dynamically forwarded to the focus owner
* in the Scene containing this keyboard.
*/
public VirtualKeyboard(ReadOnlyObjectProperty<Node> target) {
public class VirtualKeyboard {
private final VBox root ;
/**
* Creates a Virtual Keyboard.
* @param target The node that will receive KeyEvents from this keyboard.
* If target is null, KeyEvents will be dynamically forwarded to the focus owner
* in the Scene containing this keyboard.
*/
public VirtualKeyboard(ReadOnlyObjectProperty<Node> target) {
@Da9el00
Da9el00 / Controller.java
Created April 15, 2021 12:11
Alarm Clock
package sample;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.TextField;
import javafx.scene.text.Text;
import javafx.util.Duration;
.root {
-fx-accent: #1e74c6;
-fx-focus-color: -fx-accent;
-fx-base: #373e43;
-fx-control-inner-background: derive(-fx-base, 35%);
-fx-control-inner-background-alt: -fx-control-inner-background ;
}
.label{
.root {
-fx-accent: #1e74c6;
-fx-focus-color: -fx-accent;
-fx-base: #373e43;
-fx-control-inner-background: derive(-fx-base, 35%);
-fx-control-inner-background-alt: -fx-control-inner-background ;
}
.label{
@nezarjhons
nezarjhons / ToggleSwitch
Created August 25, 2021 02:34 — forked from TheItachiUchiha/ToggleSwitch
A simple Toggle Switch using JavaFX
import javafx.beans.property.SimpleBooleanProperty;
import javafx.geometry.Pos;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
public class ToggleSwitch extends HBox {
private final Label label = new Label();