Olá,
Esta aparecendo este aviso na linha da classe:
The serializable class Form10 does not declare a static final serialVersionUID field of type long
import java.awt.BorderLayout;
import java.awt.Color;
import javax.swing.*;
import java.awt.event.*;
public class Form extends JFrame{
double v1, v2, v3;
private JLabel lbl_v1;
private JTextField jtf_v1;
private JButton btn_b1;
private JPanel pnl_p1;
private void initComponents(){
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setTitle("exemplo");
lbl_v1 = new JLabel();
lbl_v1.setText("label 1");
lbl_v1.setVisible(true);
jtf_v1 = new JTextField();
jtf_v1.requestFocus();
jtf_v1.setVisible(true);
jtf_v1.setSize(20,40);
btn_b1 = new JButton();
btn_b1.setText("Sair");
btn_b1.setMnemonic('r');
btn_b1.setVisible(true);
btn_b1.addActionListener(new btn_b1Listener());
pnl_p1 = new JPanel();
pnl_p1.setVisible(true);
pnl_p1.setBackground(Color.GRAY);
pnl_p1.add(lbl_v1);
pnl_p1.add(jtf_v1);
pnl_p1.add(btn_b1);
getContentPane().add(BorderLayout.NORTH, pnl_p1);
}
public static void main(String[] args) {
Form janela = new Form();
janela.initComponents();
janela.setVisible(true);
janela.pack();
}
class btn_b1Listener implements ActionListener {
public void actionPerformed(ActionEvent e) {
dispose();
}
}