{"id":7025,"date":"2014-05-19T05:08:49","date_gmt":"2014-05-18T19:08:49","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=7025"},"modified":"2014-05-19T05:08:49","modified_gmt":"2014-05-18T19:08:49","slug":"java-cut-and-paste-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/java-cut-and-paste-primer-tutorial\/","title":{"rendered":"Java Cut and Paste Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Java\/CutPaste\/CutPaste.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Java Cut and Paste Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Java\/CutPaste\/CutPaste.jpg\" title=\"Java Cut and Paste Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Java Cut and Paste Primer Tutorial<\/p><\/div>\n<p>The clipboard is an important part of the GUI aspects to Windows and Mac OS X, and even non-GUI DOS windows or Unix\/Linux console windows would have functionality to cut, paste and copy string data.<\/p>\n<p>Today&#8217;s Java program shows cut and paste functionality in action from within a program accessing the operating system&#8217;s clipboard.<\/p>\n<p>Also touched on today are:<\/p>\n<ul>\n<li>Javac&#8217;s Xlint non-standard option <a target=_blank title='Javac Xlint tool information' href='http:\/\/www.javaworld.com\/article\/2073587\/javac-s--xlint-options.html'>tool<\/a> by Oracle (and formerly by Sun) for warnings regarding cast, deprecation, divzero, empty, fallthrough, finally, overrides, path, serial<\/li>\n<li>Show you glimpse of vi (the great Linux\/Unix <a target=_blank title='vi Unix\/Linux text editor information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Vi'>text editor<\/a>)<\/li>\n<\/ul>\n<p>So, today, with our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Java\/CutPaste\/CutPaste.jpg\" title=\"Click picture\">tutorial<\/a> we use the class StringSelection implementing the Transferable and ClipboardOwner interfaces to create the resultant Java GUI program.<\/p>\n<p>This tutorial&#8217;s code is very close to that presented in <i>Java Examples in a Nutshell<\/i> by David Flanagan (pp. 142-144).<\/p>\n<p>Link to Java programming source code which you should rename to <a target=_blank title='CutPaste.java' href='http:\/\/www.rjmprogramming.com.au\/Java\/CutPaste\/CutPaste.java_GETME'>CutPaste.java<\/a><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d7025' onclick='var dv=document.getElementById(\"d7025\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=Java\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d7025' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The clipboard is an important part of the GUI aspects to Windows and Mac OS X, and even non-GUI DOS windows or Unix\/Linux console windows would have functionality to cut, paste and copy string data. Today&#8217;s Java program shows cut &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/java-cut-and-paste-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,17,29,37],"tags":[214,265,286,549,644,649,885,907,997,1319,1479],"class_list":["post-7025","post","type-post","status-publish","format-standard","hentry","category-elearning","category-gui","category-operating-system","category-tutorials","tag-clipboard","tag-copy","tag-cut","tag-gui","tag-java","tag-javac","tag-operating-system-2","tag-paste","tag-programming","tag-tutorial","tag-xlint"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/7025"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=7025"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/7025\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=7025"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=7025"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=7025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}