• Post Reply Bookmark Topic Watch Topic
  • New Topic

Pasting into a JTextArea  RSS feed

 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I have made a GUI for a v. small application which has some JTextAreas for entering information. Sometimes, I would like to be able to paste the information in from (say) notepad. However, when I right click on the mouse there is no option to do this. Does anybody know how I might set things up so I can paste into the JTextAreas?

Cheers

Joe
 
Sheriff
Posts: 23513
47
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normally you would just press Control-V. Does that not work?
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Normally you would just press Control-V. Does that not work?



That is pasting using keyboard if you want a right click option you have to create Popupmenus no good for Application.



If you are talking about popup menus, then until you add a popup menu or add a mouse listener, a JTextArea by default should not have any options.


You can read this document if you do not know to add popupmenu
http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html
 
Joe Lemmer
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

Thanks guys. Yes ctrl v does work. I'm so used to using the mouse I didn't think of that. Sorry about the silly question!
 
Clyde DeSouza
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that is not good programming practice to use ctrl-V for GUI application mouse is essentially important so while designing must be aware of put both accessibility through keyboard also and through mouse also! in GUI application!
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not required Mouse popupmenu!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!