ShowMessageDialog from JTextArea
If I use JTextArea to show some error message like this:
JTextArea outputArea = new JTextArea( 11, 10 );
outputArea.setText( output );
JOptionPane.showMessageDialog( null, outputArea,
"Student Poll Program",
JOptionPane.INFORMATION_MESSAGE );
The Mesage is editable,how can I make it read-only to user?
Re: ShowMessageDialog from JTextArea
"Huiyuanm" <huiyuanm@uwyo.edu> wrote:
>
>
>If I use JTextArea to show some error message like this:
>JTextArea outputArea = new JTextArea( 11, 10 );
>outputArea.setText( output );
>
Insert after this above line this line
"outputArea.setEnabled(false);"
that should do it