Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Desarrollo;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import javax.swing.JButton;
- import javax.swing.JComboBox;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JOptionPane;
- import javax.swing.JTextField;
- import javax.swing.border.TitledBorder;
- import javax.swing.JPanel;
- import java.awt.Font;
- public class VentanaEjercicio2 extends JFrame{
- private static final long serialVersionUID = 1L;
- private JTextField nota1, nota2, nota3;
- private JComboBox<String> comboTP;
- private JButton btnCalcular;
- private JTextField txtPromedio;
- private JTextField txtCondicion;
- public VentanaEjercicio2() {
- setTitle("Promedio");
- setBounds(500, 250, 501, 412);
- getContentPane().setLayout(null);
- setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
- JPanel panel = new JPanel();
- panel.setBounds(42, 31, 266, 184);
- panel.setBorder(new TitledBorder(null, "Notas del estudiante", TitledBorder.LEADING, TitledBorder.TOP, null, null));
- JLabel lbl1 = new JLabel("Nota 1:");
- lbl1.setFont(new Font("Tahoma", Font.PLAIN, 12));
- lbl1.setBounds(35, 32, 46, 25);
- panel.add(lbl1);
- panel.setLayout(null);
- nota1 = new JTextField();
- nota1.setBounds(91, 32, 136, 25);
- panel.add(nota1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement