Возможности JavaFX


Создание приложения JavaFX



Download 439 Kb.
bet3/3
Sana04.06.2022
Hajmi439 Kb.
#634162
1   2   3
Bog'liq
4 лекция

Создание приложения JavaFX
  • public class JavafxSample extends Application {
  • @Override
  • public void start(Stage primaryStage) throws Exception {
  • /*
  • Code for JavaFX application.
  • (Stage, scene, scene graph)
  • */
  • }
  • public static void main(String args[]){
  • launch(args);
  • }
  • }
  • Создание приложения JavaFX
  • import javafx.application.Application;
  • import javafx.event.ActionEvent;
  • import javafx.event.EventHandler;
  • import javafx.scene.Scene;
  • import javafx.scene.control.Button;
  • import javafx.stage.Stage;
  • import javafx.scene.layout.StackPane;
  • public class Hello_World extends Application{
  • @Override
  • public void start(Stage primaryStage) throws Exception {
  • // TODO Auto-generated method stub
  • Button btn1=new Button("Say, Hello World");
  • btn1.setOnAction(new EventHandler() {
  • @Override
  • public void handle(ActionEvent arg0) {
  • // TODO Auto-generated method stub
  • System.out.println("hello world");
  • }
  • });
  • Создание приложения JavaFX
  • StackPane root=new StackPane();
  • root.getChildren().add(btn1);
  • Scene scene=new Scene(root,600,400);
  • primaryStage.setTitle("First JavaFX Application");
  • primaryStage.setScene(scene);
  • primaryStage.show();
  • }
  • public static void main (String[] args)
  • {
  • launch(args);
  • }
  • }
  • JavaFX Working with JavaFX UI Components Release 8. Alla Redko, Irina Fedortsov. 2014
  • An Introduction to Network Programming with Java. Java 7 Compatible. Jan Graba. 3rd Ed. Springer. 2013
  • Java Network Programming. Elliotte Rusty Harold.-4th ed. Published by O’Reilly Media. 2014.
  • https://www.tutorialspoint.com/javafx/index.htm
  • https://www.javatpoint.com/javafx-tutorial

Download 439 Kb.

Do'stlaringiz bilan baham:
1   2   3




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

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish