publicclass HeadlessJFrame { publicstaticvoid main(String args[]) { boolean exceptions = false; try {
JFrame b = new JFrame();
} catch (HeadlessException e) {
exceptions = true;
} if (!exceptions) thrownew RuntimeException("HeadlessException did not occur when expected");
exceptions = false; try {
JFrame b = new JFrame("Swingin' in the window");
} catch (HeadlessException e) {
exceptions = true;
} if (!exceptions) thrownew RuntimeException("HeadlessException did not occur when expected");
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.