/* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication1;
/**
*
* @author Antonio
*/
public class frame extends javax.swing.JFrame {
/**
* Creates new form frame
*/
public frame() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
[MENTION=143006]Sup[/MENTION]pressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel();
jComboBox1 = new javax.swing.JComboBox<>();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jSeparator1 = new javax.swing.JSeparator();
jSeparator2 = new javax.swing.JSeparator();
jSeparator3 = new javax.swing.JSeparator();
jSeparator4 = new javax.swing.JSeparator();
jSeparator5 = new javax.swing.JSeparator();
jSeparator6 = new javax.swing.JSeparator();
jSeparator7 = new javax.swing.JSeparator();
jSeparator8 = new javax.swing.JSeparator();
nomecompleto = new javax.swing.JLabel();
numeroatomico = new javax.swing.JLabel();
pesoatomico = new javax.swing.JLabel();
simbolo = new javax.swing.JLabel();
numerodiossidazione = new javax.swing.JLabel();
temperaturadifusione = new javax.swing.JLabel();
temperaturadiebollizione = new javax.swing.JLabel();
energiadiionizzazione = new javax.swing.JLabel();
elettronegatività = new javax.swing.JLabel();
jButton2 = new javax.swing.JButton();
jLabel20 = new javax.swing.JLabel();
configurazioneelettronica = new javax.swing.JLabel();
jSeparator9 = new javax.swing.JSeparator();
jLabel21 = new javax.swing.JLabel();
tipo = new javax.swing.JLabel();
jSeparator10 = new javax.swing.JSeparator();
jSeparator11 = new javax.swing.JSeparator();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setFont(new java.awt.Font("Tw Cen MT Condensed Extra Bold", 2, 24)); // NOI18N
jLabel1.setForeground(new java.awt.Color(204, 0, 0));
jLabel1.setText("Ecco le informazioni dell'elemento selezionato:");
jButton1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jButton1.setText("Premi dopo aver scritto o selezionato l'elemento");
jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton1MouseClicked(evt);
}
});
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jLabel2.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
jLabel2.setText("Nome Completo:");
jComboBox1.setEditable(true);
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "", "idrogeno", "elio", "litio", "berillio", "boro", "carbonio", "azoto", "ossigeno", "fluoro", "neon", "sodio", "magnesio", "alluminio", "silicio", "fosforo", "zolfo", "cloro", "argo", "potassio", "calcio", "scandio", "titanio", "vanadio", "cromo", "manganese", "ferro", "cobalto", "nichel", "rame", "zinco", "gallio", "germanio", "arsenico", "selenio", "bromo", "cripton", "rubidio", "stronzio", "ittrio", "zirconio", "niobio", "molibdeno", "tecnezio", "rutenio", "rodio", "palladio", "argento", "cadmio", "indio", "stagno", "antimonio", "tellurio", "iodio", "xeno", "cesio", "bario", "lantanio", "afnio", "tantalio", "tungsteno", "renio", "osmio", "iridio", "platino", "oro", "mercurio", "tallio", "piombo", "bismuto", "polonio", "astato", "radon", "francio", "radio", "attinio", "rutherfordio", "dubnio", "seaborgio", "bohrio", "hassio", "meitnerio", "darmstadtio", "roentgenio", "copernicio", "ununtrio", "flerovio", "ununpentio", "livermorio", "ununseptio", "ununoctio", "cerio", "praseodimio", "neodimio", "promezio", "samario", "europio", "gadolinio", "terbio", "disprosio", "olmio", "erbio", "tulio", "itterbio", "lutezio", "torio", "protoattinio", "uranio", "nettunio", "plutonio", "americio", "curio", "berkelio", "californio", "einstenio", "fermio", "mendelevio", "nobelio", "laurenzio" }));
jLabel3.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
jLabel3.setText("Peso Atomico (u):");
jLabel4.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
jLabel4.setText("Numero Atomico:");
jLabel5.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
jLabel5.setText("Simbolo:");
jLabel6.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
jLabel6.setText("Numero Di Ossidazione:");
jLabel7.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
jLabel7.setText("Temperatura di Fusione (°C):");
jLabel8.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
jLabel8.setText("Temperatura di Ebollizione (°C):");
jLabel9.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
jLabel9.setText("Energia di Ionizzazione (kj/mol):");
jLabel10.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
jLabel10.setText("Elettronegatività (Secondo Pauling):");
nomecompleto.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
nomecompleto.setForeground(new java.awt.Color(102, 0, 0));
nomecompleto.setText("...");
numeroatomico.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
numeroatomico.setForeground(new java.awt.Color(102, 0, 0));
numeroatomico.setText("...");
pesoatomico.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
pesoatomico.setForeground(new java.awt.Color(102, 0, 0));
pesoatomico.setText("...");
simbolo.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
simbolo.setForeground(new java.awt.Color(102, 0, 0));
simbolo.setText("...");
numerodiossidazione.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
numerodiossidazione.setForeground(new java.awt.Color(102, 0, 0));
numerodiossidazione.setText("...");
temperaturadifusione.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
temperaturadifusione.setForeground(new java.awt.Color(102, 0, 0));
temperaturadifusione.setText("...");
temperaturadiebollizione.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
temperaturadiebollizione.setForeground(new java.awt.Color(102, 0, 0));
temperaturadiebollizione.setText("...");
energiadiionizzazione.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
energiadiionizzazione.setForeground(new java.awt.Color(102, 0, 0));
energiadiionizzazione.setText("...");
elettronegatività.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
elettronegatività.setForeground(new java.awt.Color(102, 0, 0));
elettronegatività.setText("...");
jButton2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jButton2.setText("Azzera i valori dell'elemento che stai attualmente visualizzando");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jLabel20.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
jLabel20.setText("Configurazione Elettronica:");
configurazioneelettronica.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
configurazioneelettronica.setForeground(new java.awt.Color(102, 0, 0));
configurazioneelettronica.setText("...");
jLabel21.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
jLabel21.setText("Tipo:");
tipo.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
tipo.setForeground(new java.awt.Color(102, 0, 0));
tipo.setText("...");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jSeparator1)
.addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jSeparator4)
.addComponent(jSeparator5)
.addComponent(jSeparator6, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jSeparator7, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jSeparator8)
.addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jSeparator9)
.addComponent(jSeparator10)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(nomecompleto))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(pesoatomico))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(numeroatomico))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(simbolo))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel6)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(numerodiossidazione))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel7)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(temperaturadifusione))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(temperaturadiebollizione))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel9)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(energiadiionizzazione))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(elettronegatività))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel20)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(configurazioneelettronica))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel21)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tipo)))
.addGap(0, 0, Short.MAX_VALUE))
.addComponent(jSeparator11))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(4, 4, 4)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(nomecompleto))
.addGap(2, 2, 2)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(numeroatomico))
.addGap(2, 2, 2)
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(pesoatomico))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(8, 8, 8)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(simbolo))
.addGap(2, 2, 2)
.addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(numerodiossidazione))
.addGap(3, 3, 3)
.addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(5, 5, 5)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel7)
.addComponent(temperaturadifusione))
.addGap(4, 4, 4)
.addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(4, 4, 4)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel8)
.addComponent(temperaturadiebollizione))
.addGap(3, 3, 3)
.addComponent(jSeparator7, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(5, 5, 5)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel9)
.addComponent(energiadiionizzazione))
.addGap(7, 7, 7)
.addComponent(jSeparator8, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(1, 1, 1)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel10)
.addComponent(elettronegatività))
.addGap(3, 3, 3)
.addComponent(jSeparator9, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(5, 5, 5)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel20)
.addComponent(configurazioneelettronica))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jSeparator10, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(2, 2, 2)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel21)
.addComponent(tipo))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jSeparator11, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
);
jComboBox1.getAccessibleContext().setAccessibleParent(jComboBox1);
pack();
}// </editor-fold>
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String elemento = (String)jComboBox1.getSelectedItem(); // dove comboBox è il nome della tua variabile
if(elemento.equals("idrogeno"))
{
nomecompleto.setText("Idrogeno");
numeroatomico.setText("1");
pesoatomico.setText("1,008");
simbolo.setText("H");
numerodiossidazione.setText("-1 +1");
temperaturadifusione.setText("-259");
temperaturadiebollizione.setText("-253");
energiadiionizzazione.setText("1312");
elettronegatività.setText("2,1");
configurazioneelettronica.setText("1s(1)");
tipo.setText("Gas");
}
else if(elemento.equals("H"))
{
nomecompleto.setText("Idrogeno");
numeroatomico.setText("1");
pesoatomico.setText("1,008");
simbolo.setText("H");
numerodiossidazione.setText("-1 +1");
temperaturadifusione.setText("-259");
temperaturadiebollizione.setText("-253");
energiadiionizzazione.setText("1312");
elettronegatività.setText("2,1");
configurazioneelettronica.setText("1s(1)");
tipo.setText("Gas");
}
else if(elemento.equals("elio"))
{
nomecompleto.setText("Elio");
numeroatomico.setText("2");
pesoatomico.setText("4,003");
simbolo.setText("He");
numerodiossidazione.setText("-");
temperaturadifusione.setText("-272");
temperaturadiebollizione.setText("-253");
energiadiionizzazione.setText("2372");
elettronegatività.setText("-");
configurazioneelettronica.setText("1s(2)");
tipo.setText("Gas Nobile");
}
else if(elemento.equals("He"))
{
nomecompleto.setText("Elio");
numeroatomico.setText("2");
pesoatomico.setText("4,003");
simbolo.setText("He");
numerodiossidazione.setText("-");
temperaturadifusione.setText("-272");
temperaturadiebollizione.setText("-253");
energiadiionizzazione.setText("2372");
elettronegatività.setText("-");
configurazioneelettronica.setText("1s(2)");
tipo.setText("Gas Nobile");
}
else if(elemento.equals("litio"))
{
nomecompleto.setText("Litio");
numeroatomico.setText("3");
pesoatomico.setText("6,941");
simbolo.setText("Li");
numerodiossidazione.setText("+1");
temperaturadifusione.setText("181");
temperaturadiebollizione.setText("1342");
energiadiionizzazione.setText("520");
elettronegatività.setText("1,0");
configurazioneelettronica.setText("1s(2) 2s(1)");
tipo.setText("Metallo Alcalino");
}
else if(elemento.equals("Li"))
{
nomecompleto.setText("Litio");
numeroatomico.setText("3");
pesoatomico.setText("6,941");
simbolo.setText("Li");
numerodiossidazione.setText("+1");
temperaturadifusione.setText("181");
temperaturadiebollizione.setText("1342");
energiadiionizzazione.setText("520");
elettronegatività.setText("1,0");
configurazioneelettronica.setText("1s(2) 2s(1)");
tipo.setText("Metallo Alcalino");
}
else if(elemento.equals("berillio"))
{
nomecompleto.setText("Berillio");
numeroatomico.setText("4");
pesoatomico.setText("9,012");
simbolo.setText("Be");
numerodiossidazione.setText("+2");
temperaturadifusione.setText("1278");
temperaturadiebollizione.setText("2970");
energiadiionizzazione.setText("899");
elettronegatività.setText("1,5");
configurazioneelettronica.setText("1s(2) 2s(2)");
tipo.setText("Metallo Alcalino Terroso");
}
else if(elemento.equals("Be"))
{
nomecompleto.setText("Be");
numeroatomico.setText("4");
pesoatomico.setText("9,012");
simbolo.setText("Be");
numerodiossidazione.setText("+2");
temperaturadifusione.setText("1278");
temperaturadiebollizione.setText("2970");
energiadiionizzazione.setText("899");
elettronegatività.setText("1,5");
configurazioneelettronica.setText("1s(2) 2s(2)");
tipo.setText("Metallo Alcalino Terroso");
}
else if(elemento.equals("boro"))
{
nomecompleto.setText("Boro");
numeroatomico.setText("5");
pesoatomico.setText("10,81");
simbolo.setText("B");
numerodiossidazione.setText("+3");
temperaturadifusione.setText("2079");
temperaturadiebollizione.setText("2550");
energiadiionizzazione.setText("801");
elettronegatività.setText("2,0");
configurazioneelettronica.setText("1s(2) 2s(2) 2p(1)");
tipo.setText("Non Metallo");
}
else if(elemento.equals("B"))
{
nomecompleto.setText("Boro");
numeroatomico.setText("5");
pesoatomico.setText("10,81");
simbolo.setText("B");
numerodiossidazione.setText("+3");
temperaturadifusione.setText("2079");
temperaturadiebollizione.setText("2550");
energiadiionizzazione.setText("801");
elettronegatività.setText("2,0");
configurazioneelettronica.setText("1s(2) 2s(2) 2p(1)");
tipo.setText("Non Metallo");
}
else if(elemento.equals("carbonio"))
{
nomecompleto.setText("Carbonio");
numeroatomico.setText("6");
pesoatomico.setText("12,01");
simbolo.setText("C");
numerodiossidazione.setText("-4 +2 +4");
temperaturadifusione.setText("3652");
temperaturadiebollizione.setText("-");
energiadiionizzazione.setText("1086");
elettronegatività.setText("2,5");
configurazioneelettronica.setText("1s(2) 2s(2) 2p(2)");
tipo.setText("Non Metallo");
}
else if(elemento.equals("C"))
{
nomecompleto.setText("Carbonio");
numeroatomico.setText("6");
pesoatomico.setText("12,01");
simbolo.setText("C");
numerodiossidazione.setText("-4 +2 +4");
temperaturadifusione.setText("3652");
temperaturadiebollizione.setText("-");
energiadiionizzazione.setText("1086");
elettronegatività.setText("2,5");
configurazioneelettronica.setText("1s(2) 2s(2) 2p(2)");
tipo.setText("Non Metallo");
}
else if(elemento.equals("azoto"))
{
nomecompleto.setText("Azoto");
numeroatomico.setText("7");
pesoatomico.setText("14,01");
simbolo.setText("N");
numerodiossidazione.setText("-3 +2 +3 +4 +5");
temperaturadifusione.setText("-210");
temperaturadiebollizione.setText("-196");
energiadiionizzazione.setText("1402");
elettronegatività.setText("3,0");
configurazioneelettronica.setText("1s(2) 2s(2) 2p(3)");
tipo.setText("Non Metallo");
}
else if(elemento.equals("N"))
{
nomecompleto.setText("N");
numeroatomico.setText("7");
pesoatomico.setText("14,01");
simbolo.setText("N");
numerodiossidazione.setText("-3 +2 +3 +4 +5");
temperaturadifusione.setText("-210");
temperaturadiebollizione.setText("-196");
energiadiionizzazione.setText("1402");
elettronegatività.setText("3,0");
configurazioneelettronica.setText("1s(2) 2s(2) 2p(3)");
tipo.setText("Non Metallo");
}
else if(elemento.equals("ossigeno"))
{
nomecompleto.setText("Ossigeno");
numeroatomico.setText("8");
pesoatomico.setText("16,00");
simbolo.setText("O");
numerodiossidazione.setText("-2 -1");
temperaturadifusione.setText("-218");
temperaturadiebollizione.setText("-183");
energiadiionizzazione.setText("1314");
elettronegatività.setText("3,5");
configurazioneelettronica.setText("1s(2) 2s(2) 2p(4)");
tipo.setText("Non Metallo");
}
else if(elemento.equals("O"))
{
nomecompleto.setText("Ossigeno");
numeroatomico.setText("8");
pesoatomico.setText("16,00");
simbolo.setText("O");
numerodiossidazione.setText("-2 -1");
temperaturadifusione.setText("-218");
temperaturadiebollizione.setText("-183");
energiadiionizzazione.setText("1314");
elettronegatività.setText("3,5");
configurazioneelettronica.setText("1s(2) 2s(2) 2p(4)");
tipo.setText("Non Metallo");
}
else if(elemento.equals("fluoro"))
{
nomecompleto.setText("Fluoro");
numeroatomico.setText("9");
pesoatomico.setText("19,00");
simbolo.setText("F");
numerodiossidazione.setText("-1");
temperaturadifusione.setText("-220");
temperaturadiebollizione.setText("-188");
energiadiionizzazione.setText("1681");
elettronegatività.setText("4,0");
configurazioneelettronica.setText("1s(2) 2s(2) 2p(5)");
tipo.setText("Non Metallo");
}
else if(elemento.equals("F"))
{
nomecompleto.setText("Fluoro");
numeroatomico.setText("9");
pesoatomico.setText("19,00");
simbolo.setText("F");
numerodiossidazione.setText("-1");
temperaturadifusione.setText("-220");
temperaturadiebollizione.setText("-188");
energiadiionizzazione.setText("1681");
elettronegatività.setText("4,0");
configurazioneelettronica.setText("1s(2) 2s(2) 2p(5)");
tipo.setText("Non Metallo");
}
else if(elemento.equals("neon"))
{
nomecompleto.setText("Neon");
numeroatomico.setText("10");
pesoatomico.setText("20,18");
simbolo.setText("Ne");
numerodiossidazione.setText("-");
temperaturadifusione.setText("-229");
temperaturadiebollizione.setText("-246");
energiadiionizzazione.setText("2081");
elettronegatività.setText("-");
configurazioneelettronica.setText("1s(2) 2s(2)2p(6)");
tipo.setText("Gas Nobile");
}
else if(elemento.equals("Ne"))
{
nomecompleto.setText("Neon");
numeroatomico.setText("10");
pesoatomico.setText("20,18");
simbolo.setText("Ne");
numerodiossidazione.setText("-");
temperaturadifusione.setText("-229");
temperaturadiebollizione.setText("-246");
energiadiionizzazione.setText("2081");
elettronegatività.setText("-");
configurazioneelettronica.setText("1s(2) 2s(2)2p(6)");
tipo.setText("Gas Nobile");
}
else if(elemento.equals("sodio"))
{
nomecompleto.setText("Sodio");
numeroatomico.setText("11");
pesoatomico.setText("22,99");
simbolo.setText("Na");
numerodiossidazione.setText("+1");
temperaturadifusione.setText("98");
temperaturadiebollizione.setText("883");
energiadiionizzazione.setText("496");
elettronegatività.setText("0,9");
configurazioneelettronica.setText("1s(2) 2s(2) 2p(6) 3s(1)");
tipo.setText("Metallo Alcalino Terroso");
}
else if(elemento.equals("Na"))
{
nomecompleto.setText("Sodio");
numeroatomico.setText("11");
pesoatomico.setText("22,99");
simbolo.setText("Na");
numerodiossidazione.setText("+1");
temperaturadifusione.setText("98");
temperaturadiebollizione.setText("883");
energiadiionizzazione.setText("496");
elettronegatività.setText("0,9");
configurazioneelettronica.setText("1s(2) 2s(2) 2p(6) 3s(1)");
tipo.setText("Metallo Alcalino Terroso");
if(elemento.equals("magnesio"))
{
nomecompleto.setText("Magnesio");
numeroatomico.setText("12");
pesoatomico.setText("24,31");
simbolo.setText("Mg");
numerodiossidazione.setText("+2");
temperaturadifusione.setText("649");
temperaturadiebollizione.setText("2970");
energiadiionizzazione.setText("738");
elettronegatività.setText("1,2");
configurazioneelettronica.setText("1s(2) 2s(2) 2p(6) 3s(2)");
}
else if(elemento.equals("Mg"))
{
nomecompleto.setText("Magnesio");
numeroatomico.setText("12");
pesoatomico.setText("24,31");
simbolo.setText("Mg");
numerodiossidazione.setText("+2");
temperaturadifusione.setText("649");
temperaturadiebollizione.setText("2970");
energiadiionizzazione.setText("738");
elettronegatività.setText("1,2");
configurazioneelettronica.setText("1s(2) 2s(2) 2p(6) 3s(2)");
}
private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
nomecompleto.setText("?");
numeroatomico.setText("?");
pesoatomico.setText("?");
simbolo.setText("?");
numerodiossidazione.setText("?");
temperaturadifusione.setText("?");
temperaturadiebollizione.setText("?");
energiadiionizzazione.setText("?");
elettronegatività.setText("?");
configurazioneelettronica.setText("?");
tipo.setText("?");
}
/**
* [MENTION=128354]Para[/MENTION]m args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see [url=http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html]How to Set the Look and Feel (The Javaâ„¢ Tutorials > Creating a GUI With JFC/Swing > Modifying the Look and Feel)[/url]
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(frame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(frame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(frame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(frame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new frame().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JLabel configurazioneelettronica;
private javax.swing.JLabel elettronegatività;
private javax.swing.JLabel energiadiionizzazione;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JComboBox<String> jComboBox1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel20;
private javax.swing.JLabel jLabel21;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JSeparator jSeparator10;
private javax.swing.JSeparator jSeparator11;
private javax.swing.JSeparator jSeparator2;
private javax.swing.JSeparator jSeparator3;
private javax.swing.JSeparator jSeparator4;
private javax.swing.JSeparator jSeparator5;
private javax.swing.JSeparator jSeparator6;
private javax.swing.JSeparator jSeparator7;
private javax.swing.JSeparator jSeparator8;
private javax.swing.JSeparator jSeparator9;
private javax.swing.JLabel nomecompleto;
private javax.swing.JLabel numeroatomico;
private javax.swing.JLabel numerodiossidazione;
private javax.swing.JLabel pesoatomico;
private javax.swing.JLabel simbolo;
private javax.swing.JLabel temperaturadiebollizione;
private javax.swing.JLabel temperaturadifusione;
private javax.swing.JLabel tipo;
// End of variables declaration
}