Skip to content
Snippets Groups Projects
Commit 9cc0e3e1 authored by Lahtinen Konsta Aleksi's avatar Lahtinen Konsta Aleksi
Browse files

message

parent 1f61d96c
No related branches found
No related tags found
No related merge requests found
/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */
\ No newline at end of file
package fxesimerkki;
import fi.jyu.mit.fxgui.DynamicComboBox;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import java.net.URL;
import java.util.ResourceBundle;
/**
* @author konst
* @version 20.2.2025
*/
public class esimerkkiGUIController implements Initializable {
@FXML
private DynamicComboBox laatikko;
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<?import fi.jyu.mit.fxgui.DynamicComboBox?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<BorderPane xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxesimerkki.esimerkkiGUIController">
<center>
<GridPane prefHeight="134.0" prefWidth="170.0" BorderPane.alignment="CENTER">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="Esimerkki" />
<DynamicComboBox fx:id="laatikko" editable="true" promptText="valitse" GridPane.rowIndex="1">
<GridPane.margin>
<Insets />
</GridPane.margin>
</DynamicComboBox>
</children>
</GridPane>
</center>
</BorderPane>
package fxesimerkki;
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.fxml.FXMLLoader;
/**
* @author konst
* @version 20.2.2025
*/
public class esimerkkiMain extends Application {
@Override
public void start(Stage primaryStage) {
try {
FXMLLoader ldr = new FXMLLoader(getClass().getResource("esimerkkiGUIView.fxml"));
final Pane root = ldr.load();
//final esimerkkiGUIController esimerkkiCtrl = (esimerkkiGUIController)ldr.getController();
Scene scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("esimerkki.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.setTitle("esimerkki");
primaryStage.show();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* @param args Ei käytössä
*/
public static void main(String[] args) {
launch(args);
}
}
\ No newline at end of file
DynamicComboBox/kuvat/LaatikkoSB.png

208 KiB | W: | H:

DynamicComboBox/kuvat/LaatikkoSB.png

227 KiB | W: | H:

DynamicComboBox/kuvat/LaatikkoSB.png
DynamicComboBox/kuvat/LaatikkoSB.png
DynamicComboBox/kuvat/LaatikkoSB.png
DynamicComboBox/kuvat/LaatikkoSB.png
  • 2-up
  • Swipe
  • Onion skin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment