{"id":240197,"date":"2018-02-20T23:50:30","date_gmt":"2018-02-20T23:50:30","guid":{"rendered":"https:\/\/writemyessayfree.com\/swing-and-database-connectivity"},"modified":"2018-10-24T09:19:31","modified_gmt":"2018-10-24T09:19:31","slug":"swing-and-database-connectivity","status":"publish","type":"post","link":"https:\/\/www.benedictsol.com\/blogs\/swing-and-database-connectivity\/","title":{"rendered":"Swing and Database Connectivity"},"content":{"rendered":"<p>Swing and Database Connectivity<\/p>\n<p>Time Remaining:<\/p>\n<p>Question 1.1. (TCOs 1\u20138) Which of the following statements is false? (Points : 3)<br \/>\nYou can disable editing on a text area.<br \/>\nYou can specify the number of columns in a text area.<br \/>\nYou can create a text field with a specified text area.<br \/>\nYou can specify a horizontal text alignment in a text area.<\/p>\n<p>Question 2.2. (TCOs 1\u20138) _____ can be used to enter or display a string. (Points : 3)<br \/>\nA button<br \/>\nA check box<br \/>\nA text field<br \/>\nA label<br \/>\nA radio button<\/p>\n<p>Question 3.3. (TCOs 1\u20138) The method _____ gets the contents of the text field jtf. (Points : 3)<br \/>\njtf.findString()<br \/>\njtf.getText(s)<br \/>\njtf.getString()<br \/>\njtf.getText()<\/p>\n<p>Question 4.4. (TCOs 1\u20138) Analyze the following code.<br \/>\nimport javax.swing.*;<br \/>\nimport javax.swing.border.*;<br \/>\nimport java.awt.*;<br \/>\npublic class Test extends JFrame {<br \/>\npublic Test() {<br \/>\nBorder border = new TitledBorder(&#8220;My button&#8221;);<br \/>\nJButton jbt1 = new JButton(&#8220;OK&#8221;);<br \/>\nJButton jbt2 = new JButton(&#8220;Cancel&#8221;);<br \/>\njbt1.setBorder(border);<br \/>\njbt2.setBorder(border);<br \/>\nadd(jbt1, BorderLayout.NORTH);<br \/>\nadd(jbt2, BorderLayout.SOUTH);<br \/>\n}<br \/>\npublic static void main(String[ ] args) {<br \/>\nJFrame frame = new Test();<br \/>\nframe.setSize(200, 100);<br \/>\nframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<br \/>\nframe.setVisible(true);<br \/>\n}<br \/>\n} (Points : 3)<br \/>\nTwo buttons displayed with the same border.<br \/>\nThe program has a compile error because you assign new TitledBorder(&#8220;My button&#8221;) to a variable of the border type.<br \/>\nThe program has a runtime error because you cannot set a border on a button.<br \/>\nTwo buttons displayed, but only one button has the border.<\/p>\n<p>Question 5.5. (TCOs 1\u20138) _____ allows selections of multiple contiguous items without restrictions. (Points : 3)<br \/>\nSingle selection<br \/>\nSingle-interval selection<br \/>\nMultiple selection<br \/>\nMultiple-interval selection<\/p>\n<p>Question 6.6. (TCOs 1\u20138) To retrieve all courses with more than 3 credit hours, you write<br \/>\nselect * from Course<br \/>\nwhere numOfCredits &gt; 3;<br \/>\nIs this statement correct? (Points : 3)<br \/>\nYes<br \/>\nNo<\/p>\n<p>Question 7.7. (TCOs 1\u20138) What is the return value from<br \/>\nstmt.executeUpdate(&#8220;insert into T values (100, &#8216;Smith&#8217;)&#8221;) (Points : 3)<br \/>\nan int value indicating how many rows are effected from the invocation.<br \/>\nan object that contains the status of the execution.<br \/>\na value indicating whether the SQL statement has been executed successfully.<br \/>\nvoid.<\/p>\n<p>Question 8.8. (TCOs 1\u20138) Which of the following statements is false? (Points : 3)<br \/>\nPreparedStatement is for SQL query statements only. You cannot create a PreparedStatement for SQL update statements.<br \/>\nThe parameters in a prepared statement are denoted using the ? sign.<br \/>\nPreparedStatement is efficient for repeated executions.<br \/>\nPreparedStatement is a subinterface of Statement.<\/p>\n<p>Question 9.9. (TCOs 1\u20138) What information may not be obtained from a DatabaseMetaData object? (Points : 3)<br \/>\nMaximum number of connections to the database<br \/>\nODBC driver name and version<br \/>\nMaximum table name length and maximum number of columns in a table<br \/>\nDatabase URL and product name<\/p>\n<p>Question 10.10. (TCOs 1\u20138) The method _____ adds a text area jta to a scrollpane jScrollPane. (Points : 3)<br \/>\njScrollPane.insert(jta)<br \/>\njScrollPane.add(jta)<br \/>\njScrollPane.addItem(jta)<br \/>\nNone of them<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Swing and Database Connectivity Time Remaining: Question 1.1. (TCOs 1\u20138) Which of the following statements is false? (Points : 3) You can disable editing on a text area. You can specify the number of columns in a text area. You <a href=\"https:\/\/www.benedictsol.com\/blogs\/swing-and-database-connectivity\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-240197","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/240197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/comments?post=240197"}],"version-history":[{"count":0,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/240197\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/media?parent=240197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/categories?post=240197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/tags?post=240197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}