1st
Never
import java.awt.*;import java.awt.event.*; import javax.swing.*; import javax.swing.event.*;class A extends JFrame implements ActionListener { JLabel l1, l2, l3;JTextField tf1, tf2, tf3; JButton b1;12A() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setLayout(new FlowLayout();l1 = new JLabel("Welcome"); setSize(800, 400);l1 = new JLabel("Enter Number1"); add(l1);tf1 = new JTextField(10); add(tf1);l2 = new JLabel("Enter Number2"); add(l2);tf2 = new JTextField(10); add(tf2);l3 = new JLabel("Result"); add(l3);tf3 = new JTextField(10); add(tf3);b1 = new JButton("Divide"); add(b1);b1.addActionListener(this);setVisible(true);}public void actionPerformed(ActionEvent ae) {try {int a = Integer.parseInt(tf1.getText()); int b = Integer.parseInt(tf2.getText()); if(b==0)throw new ArithmeticException(" Divide by Zero Error"); float c = (float) a / b;tf3.setText(String.valueOf(c));} catch (NumberFormatException ex) {13JOptionPane.showMessageDialog(this,ex.getMessage()); }catch (ArithmeticException ex) { JOptionPane.showMessageDialog(this, ex.getMessage());}}}public class JavaApplication{ public static void main(String[] args) { A a = new A();}} 22222222 abstract class shape{ public int x, y;public abstract void printArea();}class Rectangle extends shape { public void printArea() {System.out.println("Area of Rectangle is " + x * y);}17}class Triangle extends shape {public void printArea() {System.out.println("Area of Triangle is " + (x * y) / 2);}}class Circle extends shape {public void printArea() {System.out.println("Area of Circle is " + (22 * x * x) / 7);}}public class Abstex {public static void main(String[] args) {Rectangle r = new Rectangle ();r.x = 10;r.y = 20;r.printArea();System.out.println ("-------------------------------------");Triangle t = new Triangle ();t.x = 30;t.y = 35;t.printArea();System.out.println ("-------------------------------------");Circle c = new Circle ();c.x = 2;c.printArea();System.out.println ("-------------------------------------");}}
Raw Text
-
Packs Ć/P PĒD0M0M Vids
2 min ago
-
Public Agent Hot hotel worker fucks a big fat cock in a public washroom in POV
10 min ago
-
asdfgadsfd
13 min ago
-
PedoWoman Boy
32 min ago
-
CH.L...DP.R.N ..p..ro..n
33 min ago
-
Real Rape Collection
33 min ago
-
rt6tease vgbhjghjkl
34 min ago
-
CP😏 LOL1🍬👧 FOLDERS 💯📁 //PEDOMON♥️🍼//R@PE😈//ZOO🐶
35 min ago
-
GORGEOUS BABE Nicole Aria Rims & Strokes BEEFY BOY Davin Strong
40 min ago
-
ertyuytut
43 min ago