JTextPane Paste

  • Permalink
  • submit to reddit
  • Email
  • Follow


I am just wondering...

Why is that for security reasons, one cannot do Ctrl+V to paste into
JTextPane?

People argue that you cannot read user's cb. But i don't need to read
user's clip board. the user will initiate the action.

I can paste into a textarea form control, and most of those forms i
paste into are not signed code???

so, why does JTextPage require signing before someone would just do
Ctrl+V?

I really think this is not a security issue, it's just unintended bug!.
because, if you can paste into a textarea on a webpage, using CTRL + V,
then you should be able to paste into the same JTextPane on the same
webpage.

Any ideas?

0
Reply tascienu (12) 4/28/2005 7:20:34 AM

See related articles to this posting


tascienu@ecoaches.com wrote:
> People argue that you cannot read user's cb. But i don't need to read
> user's clip board. the user will initiate the action.

That's wrong. It can, but it must not be user-initiated. An applet can 
contain malicious code which just tries to read the clipboard:

	Toolkit.getSystemClipboard().getContents();

This has to be prevented, so access to the system clipboard is 
controlled by a security manager.

/Thomas
-- 
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
0
Reply Thomas 4/28/2005 9:46:36 AM
comp.lang.java.gui 8294 articles. 15 followers. Post

1 Replies
294 Views

Similar Articles

[PageSpeed] 54


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

JTextPane, JEditorPane, copy & paste etc.
I've been playing around with JTextPane and JEditorPane and found a few odd things. At least under Windows and Java 1.5, neither JTextPane or JEditorPane support copying & pasting of formatted text very well. The former doesn't support it at all (even inside the control), and the latter doesn't support it when interacting with other standard Windows controls. I can, if necessary, live without the latter, but the former is definitely needed. But while it seems quite easy to put together a simple app that lets you change the text display style (font, color etc.) for new and ex...

Where does Paste Paste?
In building a new layout one often needs to copy or cut a field or a text box and paste it somewhere else. Is there any logic as to where the pasted item will appear? In some grapfics packages the new paste will be on top of the copied object and can then be moved to the desired place, others seem to paste at the current mouse point. But Filemaker (10) where oh! where. John G. On 2009-09-21 02:41:54 -0700, "John G." <greentest@ozemail.com.au> said: > In building a new layout one often needs to copy or cut a field or a text > box and paste it somewhere else. >...

JTextPane -> JTextPane
I have a window with 2 JTextPanes. I want the user to type into one in full styling (Done) I then want them to hit a send button, or the enter key (Done) And then I want the Styled text to appear in the other with the same styling The only way I can think to do anything close to this is to go through, split the text into each style, send each piece seperately, then redraw it all together.... Help? ...

From the Past. . .
Jim, You'll love the first line of this question to the FM user group. . I am the sole person of a small a/c repair business. For the longest time I have been using Q&A a 'dos' flat file database program. I am trying to update and now have Filemaker Pro 8 Advanced and using it on a pc with winxp sp2. I am trying to set it up so when I get to an address it will lookup the equipment and automatically fill it in the appropriate blocks of the current form. To do this I set up 2 databases - master and equipment. Master has all the blanks (ie, name, address, invoice #, make - mode...

JTextPanes
Hi everyone, Let's say that i have some embedded JComponents in a JTextPane, ho do i find out the starting caret position of where the JComponents are currently embedded at? Any help is greatly appreciated Yours Sincerely Richard West ...

Pasting
Hey Everybody, New to Photoshop CS and a former Paint Shop Pro 9 user. PSP9 had a pasting function that I expected to find in PSCS but don't see. In PSP9, I could copy an image or any portion of an image and then select Edit/Paste as new image and I would have a new cropped image ready for saving or editing. I don't find this function in PSCS where I believe it should be, nor do I find a reference to it in help. Is there a way to do this without creating a new image first and then pasting somthing into it? Or is there a plugin or something to that effect? Thanx, Rick ...

JTextPane
Hi everyone, I am currently trying to serialize parts of a jtextpane using the java ObjectOutputStream to write it to disk and when i am reading the object back i am using the java ObjectInputStream. When i read the api about the streams here is what they say Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.bean...

Copy-Paste, Cut-Paste, Delete files
SSB3YW50ZWQgdG8gY29weS1wYXN0ZSwgYW5kIGN1dC1wYXN0ZSwgYW5kIGRlbGV0ZSBmaWxlcyBm cm9tIGNlcnRhaW4gbG9jYXRpb25zLCB1c2luZyBTQVMgY29kZS4gSXMgdGhhdCBwb3NzaWJsZT8N Cg0KRm9yIGV4YW1wbGUgSSB3YW50IHRvIGN1dC1wYXN0ZSBDOlxteWRvY3NcYWJjLnR4dCB0byBD OlxkYXRhXGFiY2RhdGEudHh0DQpvciBJIHdhbnQgdG8gY29weS1wYXN0ZSBDOlxteWRvY3NcYWJj LnR4dCB0byBDOlxkYXRhXGFiY2RhdGEudHh0IGFuZCB0aGVuIGRlbGV0ZSBDOlxteWRvY3NcYWJj LnR4dA0KDQpUaGFua3MhDQoNClNoYWhtZWVyIEFhcmJpDQpBY3R1YXJpYWwgQW5hbHlzdA0KUHJv ZHVjdCBSZXBvcnRpbmcNCkF2aXZhIFVTQSwgRGVzIE1vaW5lcywgSUE= ...

paste
Hi, I don't success in copy /paste an output / result from the console ...

Pasting from XEmacs causes nastyness when pasting more than 256K
Hi, being a maintainer of a clipboard manager is so much fun, and even more so when your favorite editor is acting up ;-) I believe XEmacs has a bug in it's XSelectionEvent handling, somewhere. Could somebody please attempt this? 1. Create a file 262041 bytes long (Just under 256K) $ perl -e "print 'a'x262041;" > tmp.txt 2. Open this file in an XEmacs instance. $ xemacs tmp.txt & 3. Open another instance of XEmacs (not another frame or buffer, but a new instance) $ xemacs & 4. Select the entire buffer of the first instance (the one with tmp...

Paste
I just want to implement paste operation, in that i am taking data from clip board. but how can i know that it was cut or copy..??? mala.ghiya@gmail.com wrote: > I just want to implement paste operation, in that i am taking data > from clip board. > but how can i know that it was cut or copy..??? Why do you think you need it? As far as I'm concerned, the clipboard only contains a copy of the data and that's all that I should expect from it. Whether the original was deleted or not shouldn't make a difference. Uli -- Sator Laser GmbH Geschäftsf...

Mozilla composer pasting whole pages during copy and paste
I am using Debian Iceape, which is a derivative of Mozilla browser and composer, taken from Debian Unstable/Sid. I notice that as I am creating pages, and copying snippets of the HTML source from one page to another, that when I view the revised page an entire copy of the previous page has sometimes been pasted into the HTML. I suspect that something within the composer or browser is pasting to the clipboard during viewing of the pages. Has anyone else noticed this? It is a real pain because I have to take a section of HTML and I need to paste this into about 50 documents, and m...

Re: Copy-Paste, Cut-Paste, Delete files
Look at using the Call System or X command to issue a operating system command from SAS. Toby Dunn If anything simply cannot go wrong, it will anyway. Murphys Law #2. The buddy system is essential to your survival; it gives the enemy somebody else to shoot at. Murphys Law # Tell a man there are 300 billion stars in the universe and he'll believe you. Tell him a bench has wet paint on it and he'll have to touch to be sure. Murphys Law #9 From: Shahmeer Aarbi <Shahmeer.Aarbi@AVIVAUSA.COM> Reply-To: Shahmeer Aarbi <Shahmeer.Aarbi@AVIVAUSA.COM> To: SAS-L@LISTSERV...

[OT] Cut, Paste, Send, Cut, Paste, Send...
Cut, Paste, Send, Cut, Paste, Send... Thats the sound of micoshaft asstroturfers working around the clock to influence the EU fine. All these emails, blog entries and news stories need to be archived and traced to the funding source that payed for it to be be exposed and if micoshaft were found to be doing it, then to increase their fines even more upward for their illegal asstroturfing campaign. Ofcourse, after tomorrow, asstroturfer services diverted toward subverting the EU will no longer be required, and they will be back in COLA again.... Cut, Paste, Send, Cut, Paste, Send... Doh!... ...

Re: Copy-Paste, Cut-Paste, Delete files #2
Shahmeer.Aarbi@AVIVAUSA.COM wrote: > >I wanted to copy-paste, and cut-paste, and delete files from certain >locations, using SAS code. Is that possible? > >For example I want to cut-paste C:\mydocs\abc.txt to C:\data\abcdata.txt >or I want to copy-paste C:\mydocs\abc.txt to C:\data\abcdata.txt and then >delete C:\mydocs\abc.txt > >Thanks! > >Shahmeer Aarbi >Actuarial Analyst >Product Reporting >Aviva USA, Des Moines, IA If you care about preserving these files and making sure that they are copied or moved with no errors, I would suggest that you consi...

Help: Pasting from PPT->Illu always pastes twice
Hello, First, some background info: A partner of a customer of ours does data/instruction sheets in Powerpoint (really ;-). Our customer only uses FrameMaker. We are supposed to help/do the conversion PPT->FM. One requirement is, that graphics (rather complex technical illustrations) that are embedded in PPT become externally referenced, editable AI-Files. Now for the problem: Whenever I copy some graphics out of PPT and paste it into AI, everything is pasted twice. Every line, every letter a.s.o is doubled. Sometimes the second "copy" is invisible", as the first lies righ...

Copy & paste graphics -- only "paste special"?
We're running SPSS 13 on a Citrix server for use by both Macintosh and Windows users. We've recently discovered that most of the graphics routines won't "paste" directly into MS Word -- the graphics must be pasted through the "paste special" option, choosing the "picture" format. Any graphics created through the "interactive" option *will* paste directly into Word, but they appear to be the only graphics that do that. Is this normal? I thought we were doing more direct copy and pastes with version 12. Thanks for any information a...

How do I "Paste Special"-"Paste Link"?
Very new To FrameMaker and am running into a problem. I am trying to paste linked text into a FrameMaker document. I am following the instructions in the Adobe FrameMaker User Guide and the Adobe FrameMaker Online courses I am subscribed to. I have two documents open, the one I am copying from, and the one I am trying to paste to. They are both .fm files. Per the User Guide I copy the text I want from the first document, then place my insertion point in the second document. I select Edit/Paste Special, and am then supposed to choose PASTE LINK, but the PASTE option is selected and w...

Yep, Apple Rocketed Past Microsoft In Revenue This Past Quarter By Over $4 Billion
<Quote> When Apple passed Microsoft in market cap this past May, the Microsoft fanboys were out in full force. =93This means nothing.=94 =93Microsoft still makes so much more money than Apple.=94 =93Look at the revenues.=94 Okay, let=92s look at the revenues. Microsoft just posted their earnings for last quarter. The result? $16.2 billion in revenue. A very strong number, easily beating what the Street was projecting. But just 10 days ago, Apple posted their revenues for this past quarter. The result there? $20.34 billion. Yep. </Quote> http://techcrunch.com/2010/10/...

Steve Jobs' 'past years' minute on past get the better of newscaster
Apple years again topped Collapse Byway someone's cup of tea's estimates with its second-quarter earnings, bringing in dazzling profits and selling more iPhones than expected<a href=http://analizemovies.ru/porno-den-studentov-2>.</a> This minor extent overshadowed the beforehand vital sales numbers of the trendy iPad, which launched model month<a href=http://analizemovies.ru/golye-devushki-erotika>.</a> Apple has sold fewer units of the device than analysts had estimated it would<a href=http://analizemovies.ru/porno-obmen-fajlami>.</a> Appl...

gvim: When in paste mode Shift + Insert doesn't paste but writes <S-Insert>
Hi, when I am in insert modus in gvim and press Shift + Insert gvim writes a litteral '<S-Insert>' into the buffer, when I am not in the paste mode it pastes the stuff in the cutbuffer (that is what I want ... also when I am in pastemode) How can I obtain that? Thomas Thomas Glanzmann wrote: > when I am in insert modus in gvim and press Shift + > Insert gvim writes a litteral '<S-Insert>' into the > buffer, when I am not in the paste mode it pastes the > stuff in the cutbuffer (that is what I want ... also when > I am in pastemod...

copy/paste
Seems I cannot paste the copied content of an emacs session to windows application (note pad, word). vi is fine. Redhat 9, where emacs-21.3-17 is running. windows 2000, where copy/paste is being done. Can somebody see what's going on? Jun H. Zhang "Jun Zhang" <JHZhang@mdanderson.org> wrote in message news:0nyid.8388$fC4.2014@newssvr11.news.prodigy.com... > Seems I cannot paste the copied content of an emacs session to windows > application (note pad, word). vi is fine. > > Redhat 9, where emacs-21.3-17 is running. > windows 2000, where copy/paste is b...

UTF for JTextPane
I have a JTextPane that has some square boxes and have tried using a "...br = new BufferedReader(new InputStreamReader(..., "UTF-8"))..." to no avail. Any help is appreciated. ...

copy paste
If you run a Swing program standalone, you can copy paste its fields. But if you run it as an Applet in browser, you cannot. Is there a way to fix this? -- Roedy Green Canadian Mind Products http://mindprod.com Refactor early. If you procrastinate, you will have even more code to adjust based on the faulty design. .. On 28/02/2011 17:13, Roedy Green allegedly wrote: > If you run a Swing program standalone, you can copy paste its fields. > But if you run it as an Applet in browser, you cannot. Is there a way > to fix this? I'm not sure Applets have access to th...