일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
- #성적관리프로그램
- html object
- html5 new tag
- git flow
- #android activity
- relative path
- #JAVASCRIPT
- #2차원배열
- 하이퍼레저패브릭
- html multimedia
- #C++ has~a
- #CallByAddress
- #자바상속#자바이즈어#is~a
- mac terminal command
- hyperledger transaction
- docker example
- html charset
- #binary
- html code
- #bubbleSort
- html youtube
- border-box
- #1차원배열
- #다차원포인터
- 토큰경제
- html plug-in
- html id
- #3차원배열
- #C++ 연산자함수오버로딩
- html video
- Today
- Total
A sentimental robot
UI 본문
import javafx.application.Application;
import javafx.stage.Stage;
public class Hello extends Application {
@Override
public void init() throws Exception {
System.out.println("initiate");
}
@Override
public void start(Stage arg0) throws Exception {
System.out.println(2);
arg0.show();
System.out.println(3);
}
@Override
public void stop() throws Exception {
System.out.println("stop");
}
public static void main(String[] args) {
System.out.println(1);
launch(); // init()->start()->stop()
System.out.println(4);
}
}
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class Hello extends Application {
@Override
public void start(Stage arg0) throws Exception {
VBox vbox = new VBox(); // Vertical Box
vbox.setPrefSize(300, 300);
Scene scene = new Scene(vbox);
arg0.setScene(scene);
arg0.setTitle("server");
arg0.show();
}
public static void main(String[] args) {
launch();
}
}
package Pack01;
import javafx.scene.control.Button;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class Hello extends Application {
@Override
public void start(Stage arg0) throws Exception {
VBox vbox = new VBox(); // Vertical Box
vbox.setPrefSize(300, 300);
// ---------------
Button btn1 = new Button("코끼리1");
btn1.setOnAction(new EventHandler<>() {
@Override
public void handle(ActionEvent arg0) {
System.out.println("btn1.setonaction");
}
});
Button btn2 = new Button("코끼리2");
vbox.getChildren().addAll(btn1, btn2);
// ---------------
Scene scene = new Scene(vbox);
arg0.setScene(scene);
arg0.setTitle("server");
arg0.show();
}
public static void main(String[] args) {
launch();
}
}
'Java' 카테고리의 다른 글
Platform.runLater( ) (0) | 2018.02.07 |
---|---|
Chatting UI (0) | 2018.02.07 |
진수에 대해서 (0) | 2018.01.09 |
객체참조 (0) | 2018.01.09 |
다운캐스팅, Downcasting (0) | 2018.01.09 |