Code: Select all
Users can also have roles within the application, and they can be
members of groups; both can be defined freely, although some sample roles
and groups will be created with the installation.
Beachten Sie die Rechtecke zwischen den Mitgliedern < /code> und Rollen und < /code>. Beim Kopieren der Sequenz und beim Einfügen in einen Texteditor gibt es keine Sonderzeichen (daher muss ich hier einen Screenshot vorlegen…). /p>
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class MWE extends Application
{
public static void main( String... args )
{
launch( args );
}
public void start( Stage primaryStage )
{
primaryStage.setTitle( "Minimal Working Example" );
final var webView = new WebView();
webView.getEngine().loadContent(
"""
Users can also have roles within the application, and they can be
members of groups; both can be defined freely, although some sample roles
and groups will be created with the installation.
"""
);
final var vBox = new VBox( webView );
final var scene = new Scene( vBox, 960, 600 );
primaryStage.setScene( scene );
primaryStage.show();
}
}
< /code>
Ich verwende Java 21.0.1 mit Javafx 21.0.3 auf Ubuntu 22.04.4 lts. Und ursprünglich wird das HTML aus einer Datei gelesen. Quelle hatte die Linienbrüche. Anders als die HTML -Reformatierung natürlich.