Berbagai Contoh Control pada JavaFX 1.3


Ini berbagai contoh control pada JavaFX 1.3

package bab8_antarmuka;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ProgressBar;
import javafx.scene.control.RadioButton;
import javafx.scene.control.Slider;
import javafx.scene.control.ToggleButton;
import javafx.scene.control.PasswordBox;
import javafx.scene.control.ScrollView;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ListView;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.TextBox;
import javafx.scene.control.Hyperlink;
import javafx.geometry.Insets;
import javafx.scene.layout.HBox;
import javafx.scene.layout.LayoutInfo;
import javafx.scene.control.ToggleGroup;

/**
* @author bhangun
*/
var button=Button {
text: “Button”
action: function () {

}
}
var label=Label {
text: “Label:”
}
var progressBar=ProgressBar {
progress: bind ProgressBar.computeProgress(100, 30)
}
var radioButton=RadioButton {
text: “Press me!”
}
var slider=Slider {
min: 1
max: 10
vertical: false
}
var toggleButton=ToggleButton {
text: “First”
}
var passwordBox=PasswordBox {
columns: 12
selectOnFocus: true
}
var scrollView=ScrollView {}
var checkBox=CheckBox {
text: “Check me!”
allowTriState: false
selected: false
}
var listView=ListView {
items: [‘Item’, ‘Item2’]
}
var progressIndicator=ProgressIndicator {
progress: bind ProgressIndicator.computeProgress(100, 30)
}
var scrollBar=ScrollBar {
min: 1
max: 10
vertical: false
}
var textBox=TextBox {
text: “SampleText”
columns: 12
selectOnFocus: true
}
var hyperlink=Hyperlink {
text: “https://belajarjavafx.wordpress.com”
action: function () {

}
}
var toggleGroup=ToggleGroup {}

Stage {
title: “Control”
onClose: function () {
}
scene: Scene {
width: 500
height: 300
content: [
ScrollView {
layoutInfo: LayoutInfo {
width: 500
height: 300
}
node: HBox {
padding: Insets {top: 10 right: 4 bottom: 4 left: 10 }
spacing: 10
content: [
button,
label,
progressBar,
radioButton,
slider,
toggleButton,
passwordBox,
scrollView,
checkBox,
listView,
progressIndicator,
scrollBar,
textBox,
hyperlink
//toggleGroup
]
}
}
]
}
}

Advertisements

One Response to Berbagai Contoh Control pada JavaFX 1.3

  1. […] Berbagai Contoh Control pada JavaFX 1.3 June 2010 3 […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: