Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javaapplication23;
- import javax.swing.JFrame;
- import javax.swing.JOptionPane;
- public class JavaApplication23 {
- public static void main(String[] args) {
- int a = Integer.parseInt(JOptionPane.showInputDialog("Please Enter The First Number: "));
- int b = Integer.parseInt(JOptionPane.showInputDialog("Please Enter The Second Number: "));
- JOptionPane.showMessageDialog(null, a*b, "WADU", JOptionPane.WARNING_MESSAGE);
- GUI g = new GUI();
- g.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- g.setSize(400, 400);
- g.setVisible(true);
- }
- }
- ------------------------------
- package javaapplication23;
- import java.awt.FlowLayout;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JTextField;
- public class GUI extends JFrame {
- private JLabel label1;
- private JLabel label2;
- private JLabel label3;
- public GUI() {
- super("Alinma Bank");
- setLayout(new FlowLayout());
- label1 = new JLabel("Username");
- label2 = new JLabel("Password");
- label3 = new JLabel("Secret Code");
- label1.setToolTipText("Place For Entering Username.");
- label2.setToolTipText("Place For Entering Password.");
- label3.setToolTipText("Place For Entering Secret Code.");
- add(label1);
- add(label2);
- add(label3);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement