stacktrace
stacktrace

Reputation: 557

JavaFx Dialog Title vs Header Text

I'm accustomed to using dialogs in Swing where I have a title and content text to set. With dialogs in JavaFx we now have header text. Are there any conventions for how this would typically be set that is different from the title?

For example if I wanted to warn the user that I was about to delete something I would set the title to "Delete Foo" and the content to "About to delete Foo. Continue?". Other than duplicating the title, how is the header intended to be used?

Upvotes: 1

Views: 915

Answers (1)

wzberger
wzberger

Reputation: 933

Because it depends on the used operation system there's no official guideline for JavaFX. It's mostly up to you - generally try to be consistent within your application.

As you maybe know you can set the header text to null - the result is pretty similar to Swing. Only title and description appears together with an icon.

The more modern variant is setting the title to the alert type, use a simple summary of the error/condition as header text. And use the content text as fuller description. You can also take a look at the user guidelines of different operation systems - i.e. for OSX here.

Upvotes: 2

Related Questions