Copy/paste in applet

Hi,

My applet hasn't certificate, but I can copy / paste in / from Windows clipboard, but when I show dialog which has JTextArea I can't copy / paste in windows clipboard, even not in control which is in applet. Can I do something (without signing applet) to copy / paste in JTextArea in dialog?

Thanks.

P.S. Control from applet to which I can copy & paste is JTextField.

Message was edited by:

boba5555

[447 byte] By [boba5555a] at [2007-10-3 4:04:56]
# 1
Hi,it depends on the version of jre. Try applet on this page and you will see: http://www.informatik.uni-oldenburg.de/~there/javaclipboard/L.P.
lukika at 2007-7-14 22:04:09 > top of Java-index,Desktop,Core GUI APIs...
# 2
I have installed Java 1.5 and on JTextFiled copy / paste works, but in JTextArea not.
boba5555a at 2007-7-14 22:04:09 > top of Java-index,Desktop,Core GUI APIs...
# 3
So than it needs to be signed. Or try to use AWT components instead of Swing components. These should work.L.P.
lukika at 2007-7-14 22:04:09 > top of Java-index,Desktop,Core GUI APIs...
# 4

Ok. Than I should use Dialog from AWT, but I don't know how to add control. Bellow is my JOptionPane code. Can you help me to rewrite it to work with Dialog?

JScrollPane spMatchToText = new JScrollPane();

JTextArea taMatchToText = new JTextArea([some text]);

taMatchToText.setLineWrap(true);

taMatchToText.setWrapStyleWord(true);

spMatchToText.getViewport().setView(taMatchToText);

spMatchToText.setPreferredSize(new Dimension(150, 200));

spMatchToText.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

spMatchToText.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

JOptionPane.showMessageDialog(pChessOption , spMatchToText , "History" , JOptionPane.INFORMATION_MESSAGE);

Thanks.

boba5555a at 2007-7-14 22:04:09 > top of Java-index,Desktop,Core GUI APIs...
# 5
Instead of JOPtionPane use Dialog from AWT. In this add Button, Label, Image if you like, set header of Dialog. And this can be your JOptionPane.INFORMATION_MESSAGE.However why you don't replace only JTextArea with TextArea?L.P.
lukika at 2007-7-14 22:04:09 > top of Java-index,Desktop,Core GUI APIs...
# 6
It works. Thanks.Only to set wrap and size and everything is fine and to find way to show time of loading on this post http://forum.java.sun.com/thread.jspa?threadID=764809 :)
boba5555a at 2007-7-14 22:04:09 > top of Java-index,Desktop,Core GUI APIs...