Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java D.2111 10. Which of the following classes in Swing can be use to create component oigens.o C display texts with multiple lines? A. JLabe

image text in transcribed

image text in transcribed

image text in transcribed

java

D.2111 10. Which of the following classes in Swing can be use to create component oigens.o C display texts with multiple lines? A. JLabe B. JButton C. JTextArea D Section B - READ AND ANSWER (35 marks) aune the caude is contained 1. Read the programs/fragments, and write the output. You may sum within otherwise correct program. (20 marks in total with 4 marks ead) 1 class E int a 10; void me(E e) System.out, printin("e,a. .); System . out , printin("e,a" + e,a); class Test ( public stati void main(String args[]) c E ef - new E): Sy { stem.out.printin("ef.a" ef.a); ef.me(ef); ystem.out.println("ef.a"ef.a); 2) class Test f public static void main(Stringl] args) t try f calLMethod); y catch (Exception e) f System.out.print("will "); System.out.printIn("win "); static void createException()( throw new ArithmeticException); static void callMethod() ( try f createException(): System.out.print ("not ") catch (ArrayIndexoutOfBoundsException e) f System.out.print ("you "); ) finally t System.out.print ("I System.out.print("never "); 3) public class Test f AB s = new AB( "Hello!", "I love JAVA."); System.out.println(s.toString)); public static void main(String argstl) ( static void createException) ( throw new ArrayIndexOut0fBoundsException(); static void method() try f createException(); System.out.print ('a'); System.out.print 'b); System.out.print('c); catch (ArrayIndexOutOfBoundsException e) f ) finally t System.out.print ('d'); field. The two buttons can be (with a default value 0 or with from user 2. Write a Graphic U ser Interface with two buttons and one text clicked, making the value within the text field input) increas e and decrease by one, respectively.(10 marks) import java.awt.*; import the whole swing package

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions

Question

What are the two types of PLUS Loans?

Answered: 1 week ago

Question

here) and other areas you consider relevant.

Answered: 1 week ago