class Main {
public static void main(String[] args) {
//JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。
System.out.println("Hello world! - java.jsrun.net ");
}
}
/*HelloController
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeView;
import javafx.scene.input.MouseEvent;
import javafx.fxml.Initializable;
import java.net.URL;
import java.util.ResourceBundle;
public class HelloController implements Initializable {
@FXML
private Label welcomeText;
@FXML
private TreeView treeView;
@FXML
protected void onHelloButtonClick() {
welcomeText.setText("Welcome to JavaFX Application!");
}
@FXML
protected void handleLabelClick(MouseEvent mouseEvent) {
welcomeText.setText("Label clicked!");
}
public HelloController(){
System.out.println("yyyyyyyyyyyyyyyy");
}
public void initialize(){
System.out.println("1111111111111111");
}
@Override
public void initialize(URL location, ResourceBundle resources) {
System.out.println("2222222222222222");
TreeItem<String>rootItem = new TreeItem<>("Root");
TreeItem<String>childItem = new TreeItem<>("Child");
rootItem.getChildren().add(childItem);
treeView.setRoot(rootItem);
}
public void onActionLogin(ActionEvent actionEvent) {
}
}
*/
/*
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity"
prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/17.0.2-ea"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.demo3.HelloController">
<top>
<VBox BorderPane.alignment="CENTER">
<children>
<MenuBar>
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" text="Close" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Edit">
<items>
<MenuItem mnemonicParsing="false" text="Delete" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="About" />
</items>
</Menu>
</menus>
</MenuBar>
<HBox spacing="5.0">
<children>
<TextField promptText="username" />
<TextField promptText="password" />
<Region HBox.hgrow="ALWAYS" />
<Button fx:id="login" mnemonicParsing="false" onAction="#onActionLogin" text="LogIn" />
<Button mnemonicParsing="false" text="Setting" />
</children>
<VBox.margin>
<Insets bottom="8.0" left="8.0" right="8.0" top="8.0" />
</VBox.margin>
<padding>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</padding>
</HBox>
</children>
</VBox>
</top>
<left>
<TreeView id="treeView" fx:id="treeView" BorderPane.alignment="CENTER" />
</left>
<center>
<TextArea prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" />
</center>
<bottom>
<HBox BorderPane.alignment="CENTER">
<children>
<Label text="Label" />
</children>
</HBox>
</bottom>
</BorderPane>
*/