| Other |
|---|
| jfx24 b08Fixed |
|
Cloners :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
It is possible to crash Swing by calling Platform.Exit()
import javafx.application.Application;
import javafx.application.Platform;
import javafx.stage.Stage;
import javax.swing.*;
public class PlatformExitCrash extends Application {
public static void main(String[] args) {
SwingUtilities.invokeLater(PlatformExitCrash::createSwing);
Application.launch(args);
}
private static void createSwing() {
JDialog d = new JDialog();
Platform.runLater(()-> {
Platform.exit();
});
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
}
d.setVisible(true);
}
@Override
public void start(Stage st) {
}
}
|