Answered step by step
Verified Expert Solution
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
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 packageStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started