Reputation: 11
I have created a JTextarea in java swing and the program run successfully.My need is when i run this swing program and type in this text area ,the user cannot do other actions like typing in run,search etc unless he close the program or press escape button.That means full focus only to the textarea when the program is running.
Please anybody help me
Upvotes: 0
Views: 38
Reputation: 324157
Use a JOptionPane that contains a JTextArea.
Read the section from the Swing tutorial on How to Use Dialogs for more information and examples. The JOptionPane API will allow you do add any Swing component to the dialog.
Upvotes: 2