In our Swing application, we show error messages using **JOptionPane.showOptionDialog**. However, some of the messages are long and we would like to **limit the height** of the dialog and **show a scrollbar**. We thought of using HTML and CSS in the dialog text to limit the height and show scrollbar, but it seems Swing's HTML & CSS [is](https://stackoverflow.com/questions/1057137/css-with-swing) [quite](https://stackoverflow.com/questions/937393/can-i-apply-css-to-swing-text-components) [limited](https://stackoverflow.com/questions/872871/which-html-tags-are-supported-in-swing-components).

Can anyone thing of a way to do it, other then developing our own dialog to show error messages?

Thanks  
splintor