본문 바로가기
GUI( JavaFX Scene Builder )/Control

DatePicker

by pms93 2022. 8. 18.
package controls;

import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.DatePicker;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;

public class DatePickerEx extends Application {

	public static void main(String[] args) {
		launch(args);
	}
	
	@Override
	public void start(Stage primaryStage) throws Exception {
		// DatePiker
		// - 날짜선택상자 생성
		DatePicker dp = new DatePicker();
		
		HBox hbox = new HBox();
		hbox.getChildren().add(dp);
		hbox.setAlignment(Pos.CENTER);
		
		primaryStage.setScene(new Scene(hbox, 700, 700));
		primaryStage.show();
	}
}

'GUI( JavaFX Scene Builder ) > Control' 카테고리의 다른 글

Control 예제  (0) 2022.08.18
TextArea  (0) 2022.08.18
PasswordField  (0) 2022.08.18
TextField  (0) 2022.08.18
ToggleButton  (0) 2022.08.18