In: Computer Science
Part 1 Write a program that displays a frame containing two labels that display your name, one for your first name and one for your last. Experiment with the size of the window to see the labels change their orientation to each other. USE FIRST NAME: Aya LAST NAME: KAYED. SEND THE CODE IN THE EXACT FORMAT FOR JAVA ECLIPSE. I WILL COPY AND PASTE THE CODE SO I CAN RUN IT. Part 2 Propose and solve your own digital design problem.
Q1.
In the ActionListener event of Button write the following code-
jLabel1.setText("AYA");
jLabel2.setText("KAYED");
Q2. let a problem be of a shopping list-
CODE :
write it in actionevent listener of the button
int price=0;
if(jCheckBox1.isSelected()){
price=price+10;
}
if(jCheckBox2.isSelected()){
price=price+15;
}
if(jCheckBox3.isSelected()){
price=price+30;
}
jTextField1.setText(""+price);
}