The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 408 Weeks Ago, 6 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
QUESTION / SOALAN 1 Marks/Markah Write an Applet program to produce the following user interface. You are not required to write codes for event handling. Tuliskan aturcara Applet untuk menghasilkan antara muka di berikut. Anda tidak diperlukan untuk menulis kod untuk pengendalian peristiwa. (Total / Jumlah : 20) QUESTION / SOALAN 2 Consider the following Applet user interface. The features of the text typed by users can be changed to bold or/and italics. For instance, when a user chooses Bold checkbox, then the text will be in bold. Based on this information write the statements for A-E in the event handler method below. (Assume the name for the TextField is txt, the checkbox Bold has the name bold, the checkbox Italic has the name italic and both have been registered as an event listener). public void ____A_____(ItemEvent e){ int t=0,c=0; Font font; if (____B_____) t = Font.BOLD; 16 CBOP3203JAN09/F-SA if (____C_____) c = Font.ITALIC; font = new Font(“Serif”,______D_______ , 14); txt._______E______(font); } Note: Write down your answer in the answer booklet (Total / Jumlah : 20) Pertimbangkan antara muka Applet berikut. Ciri teks yang ditaip oleh pengguna boleh ditukarkan ke “bold” dan/atau “italic”. Sebagai contoh, jika pengguna mengklik checkbox Bold, maka teks akan ditebalkan (bold). Berdasarkan maklumat ini, tuliskan pernyataan untuk A-E bagi metod pengendali peristiwa di bawah. Andaikan nama objek TextField sebagai txt, objek checkbox Bold mempunyai nama bold, objek checkbox Italic mempunyai nama italic dan kedua-duanya telah didaftar sebagai pendengar peristiwa. public void ____A_____(ItemEvent e){ int t=0,c=0; Font font; if (____B_____) t = Font.BOLD; 17
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll