ShowMessageDialog from JTextArea


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: ShowMessageDialog from JTextArea

Hybrid View

  1. #1
    Huiyuanm Guest

    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?







  2. #2
    Nikolaj B.N. Guest

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center