Mavzu: Dasturiy ta’minotni loyihalash va dizayn jarayonini hamda uning ma’lumotlar bazasi qismini dasturiy ta’minot standartlariga ko’ra tayyorlash


Download 1.46 Mb.
bet7/9
Sana02.01.2022
Hajmi1.46 Mb.
#191718
1   2   3   4   5   6   7   8   9
Bog'liq
651-17-7-Otajonov-Abduqahhor

import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.Alert;
import javafx.scene.control.Label;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.BorderPane;
import javafx.util.Duration;
import sample.DataAccsesObject.DataAccsesObject;
import sample.Modellar.Telefon;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
public class Asosiy {
@FXML
private Label vaqt;
@FXML
private Label sana;
@FXML
private JFXButton tolov;
@FXML
private JFXButton hodim;
@FXML
private JFXButton guruh;
private void getSoat(){
Timeline timeline=new Timeline(new KeyFrame(Duration.seconds(0), new EventHandler() {
@Override
public void handle(ActionEvent event) {
Calendar calendar=Calendar.getInstance();
SimpleDateFormat dateFormat=new SimpleDateFormat("HH:mm:ss");
vaqt.setText(dateFormat.format(calendar.getTime()));
}
}),new KeyFrame(Duration.seconds(1)));
timeline.setCycleCount(Animation.INDEFINITE);
timeline.play();
}
private void getSana(){
Date date=new Date();
SimpleDateFormat dateFormat=new SimpleDateFormat("dd:MM:yyyy");
this.sana.setText(dateFormat.format(date));
}
@FXML
private BorderPane root;
Navigation navigation=new Navigation();
@FXML
void handle_mahsulot(ActionEvent event) throws IOException {
AnchorPane anchorPane=(AnchorPane)FXMLLoader.load(getClass().getResource(navigation.getMahsulotController()));
root.setCenter(anchorPane);
}
@FXML
void handle_sozlamalar(ActionEvent event) throws IOException {
AnchorPane anchorPane=(AnchorPane)FXMLLoader.load(getClass().getResource(navigation.getSozlamalarAsosiy()));
root.setCenter(anchorPane);
}
@FXML

Download 1.46 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling