۱۳۸۷ مهر ۲, سه‌شنبه

یک نرم افزار ساده شیمیA Simple Chemistry Software

این اولین نرم افزار شیمی ه که موفق شدم با جاوا بنویسم !

A simple chemistry software in Persian language


//Chem1.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Chem3 extends JFrame implements ItemListener{

JComboBox cb;
JLabel lbl;
Icon i01, i02, i03, i04, i05, i06, i07, i08, i09, i10, i11, i12 , i13 ,i14 ,i15,i16,i17,i18,i19,i20,i21,i22,i23,i24,i25,i26,i27,i28,i29,i30,i31,i32,i33,i34,i35 ;
//Main
public static void main(String ar[]){
JFrame f=new Chem3();
f.setTitle ("Created By Kian Kiani");
f.setDefaultCloseOperation(f.EXIT_ON_CLOSE);
f.setSize(200,160);
f.setVisible(true);
}
//Frame
public Chem3(){

i01 = new ImageIcon( "images/ca.jpg" );
i02 = new ImageIcon( "images/k.jpg" );
i03 = new ImageIcon( "images/So.jpg" );
i04 = new ImageIcon( "images/Li.jpg" );
i05 = new ImageIcon( "images/mg.jpg" );
i06 = new ImageIcon( "images/fe.jpg" );
i07 = new ImageIcon( "images/ba.jpg" );
i08 = new ImageIcon( "images/cu.jpg" );
i09 = new ImageIcon( "images/shi.jpg" );
i10 = new ImageIcon( "images/p.jpg" );
i11 = new ImageIcon( "images/cr.jpg");
i12 = new ImageIcon( "images/z.jpg");
i13 = new ImageIcon( "images/a.jpg");
i14 = new ImageIcon( "images/km.jpg");
i15 = new ImageIcon( "images/km1.jpg");
i16 = new ImageIcon( "images/am.jpg");
i17 = new ImageIcon( "images/soc.jpg");
i18 = new ImageIcon( "images/cl.jpg");
i19 = new ImageIcon( "images/clc.jpg");
i20 = new ImageIcon( "images/hcl.jpg");
i21 = new ImageIcon( "images/sa.jpg");
i22 = new ImageIcon( "images/su.jpg");
i23 = new ImageIcon( "images/pa.jpg");
i24 = new ImageIcon( "images/ppo.jpg");
i25 = new ImageIcon( "images/si.jpg");
i26 = new ImageIcon( "images/pb.jpg");
i27 = new ImageIcon( "images/cc.jpg");
i28 = new ImageIcon( "images/hip.jpg");
i29 = new ImageIcon( "images/nia.jpg");
i30 = new ImageIcon( "images/nio.jpg");
i31 = new ImageIcon( "images/nis.jpg");
i32 = new ImageIcon( "images/cb.jpg");
i33 = new ImageIcon( "images/amo.jpg");
i34 = new ImageIcon( "images/pc.jpg");
i35 = new ImageIcon( "images/hg.jpg");

cb = new JComboBox();
String[] strmenu = {"CaCO3", "KNO3", "Na2SO4", "LiCl","MgO","Fe(OH)3","BaSO3","Cu(NO2)2","NaOH", "KOH","Cr2S3",
"Zn3(PO4)2","AgI","KMno4","K2MnO4","(NH4)2Cr2O7","Na2CrO4","NaClO2","Ca(ClO3)2","HCl","H2SO4","H2SO3","H3PO4",
"H3PO3","Na2SiO3","PbO2","CaC2","KClO","HNO3","HNO2","NiSO4","Ca(HCO3)2","NH4NO3","KClO4","Hg(NO3)2"};
for( int i=0 ; i < lbl="new" c="getContentPane();" c="getContentPane();" imgidx="cb.getSelectedIndex();" imgidx="="0){" imgidx="="1){" imgidx="="2){" imgidx="="3){" imgidx="="4){" imgidx="="5){" imgidx="="6){" imgidx="="7){" imgidx="="8){" imgidx="="9){" imgidx="="10){" imgidx="="11){" imgidx="="12){" imgidx="="13){" imgidx="="14){" imgidx="="15){" imgidx="="16){" imgidx="="17){" imgidx="="18){" imgidx="="19){" imgidx="="20){" imgidx="="21){" imgidx="="22){" imgidx="="23){" imgidx="="24){" imgidx="="25){" imgidx="="26){" imgidx="="27){" imgidx="="28){" imgidx="="29){" imgidx="="30){" imgidx="="31){" imgidx="="32){" imgidx="="33){" imgidx="="34){" lbl="new" event="" public="" void="" itemevent="" container="" c="getContentPane();" int="" else="" if="" imgidx="cb.getSelectedIndex();" setbackground="" 0="">

هیچ نظری موجود نیست: