wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Copy paste operations in disabled textfields Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Copy paste operations in disabled textfields" Watch "Copy paste operations in disabled textfields" New topic
Author

Copy paste operations in disabled textfields

vasu kasukurthi
Greenhorn

Joined: Dec 14, 2009
Posts: 9
i have following code.
JTextField jtfCol1 = new JTextField(5);
JTextField jtfCol2 = new JTextField(5);
---
---
jtfCol1 .setEnabled(false); jtfCol2 .setEnabled(false);

i need to perform copy and paste operations on these fields, But they are disabled. I tried with setEditable(false); also but it is not working.

Can any one help me.

Thanks in advance.


Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
make them uneditable, which allows copy
override paste() to change editable to true, perform paste(), then editable back to false
vasu kasukurthi
Greenhorn

Joined: Dec 14, 2009
Posts: 9
thank you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Copy paste operations in disabled textfields
 
Similar Threads
grey out Jtextfield when disabled.
setEnabled Problem
JTextField on a disabled JSplitPane - problem with selectAll()
Solaris SWING Middle Mouse Button
JTextFiled and Jpopupmenu