Powered by Blogger.

Contact

Popular Posts

Monday, 29 July 2013

By Noura Yehia JavaScript libraries have made huge leaps and bounds in helping developers write code and develop products more quickly. jQuery is one of the most popular JavaScript frameworks, with powerful tools that improve the user’s interaction with Web applications. jQuery has an additional advantage in that it allows developers to select elements on a page using CSS-like syntax. To help you take it up a notch, we share below some methods...
/* * login_form.java * * Created on July 16, 2013, 10:57 AM */package loginform;/** * * @author  LTIET_CSE_DEPT */public class login_form extends javax.swing.JFrame {        /** Creates new form login_form */    public login_form() {        initComponents();        jOptionPane1.setVisible(false);    }        /** This method is called from within the...

Saturday, 27 July 2013

   package ajt;import java.awt.*;import java.awt.event.*;import javax.swing.*;class StudentReg extends JPanel implements ActionListener {        JButton b1;    JTextField t1,t2,t3;    JLabel l1,l2,l3,l4;    JCheckBox c1,c2,c3;    JRadioButton r1,r2;    ButtonGroup bg1;    JComboBox cb;    String str="Game : ";    JCheckBox c[] = new JCheckBox[3];    public StudentReg()   ...
package ajt;/** * * @author  SAGAR */public class StudentRegForm extends javax.swing.JFrame {    /** Creates new form StudentRegForm */    public StudentRegForm() {        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...
import javax.swing.JFrame;  import javax.swing.JCheckBox;  import javax.swing.JButton;  import javax.swing.JOptionPane;    import java.awt.GridLayout;    import java.awt.event.ActionEvent;  import java.awt.event.ActionListener;    public class GetSelectedJCheckBox implements ActionListener  {  //Create String that will be use to hold selected JCheckBox text  String selectedCheckBox="";    //Create check box using JCheckBox  JCheckBox checkBox1=new JCheckBox("Duck");  JCheckBox checkBox2=new JCheckBox("Chicken");  JCheckBox checkBox3=new JCheckBox("Cow");  JCheckBox checkBox4=new JCheckBox("Sheep");    //Create button using JButton with text ( Get selected JCheckBox )  JButton button=new JButton("Get selected JCheckBox");    //method actionPerformed that we override because we implement ActionListener  public void actionPerformed(ActionEvent event)  {   //Action for button   if(event.getSource()==button)   {    //Check first JCheckBox is selected or not    if(checkBox1.isSelected())    {     selectedCheckBox=selectedCheckBox+checkBox1.getText()+"\n";    }       //Check second JCheckBox is selected or not    if(checkBox2.isSelected())    {     selectedCheckBox=selectedCheckBox+checkBox2.getText()+"\n";    }       //Check third JCheckBox is selected or not    if(checkBox3.isSelected())    {     selectedCheckBox=selectedCheckBox+checkBox3.getText()+"\n";    }       //Check fourth JCheckBox is selected or not    if(checkBox4.isSelected())    {     selectedCheckBox=selectedCheckBox+checkBox4.getText()+"\n";    }       //Show message that tell you, what check box that you selected    JOptionPane.showMessageDialog(null,"Selected check box is : \n"+selectedCheckBox);       //Make selectedCheckBox string like initial with empty string    selectedCheckBox=new String("");   }  }    //Constructor  public GetSelectedJCheckBox()  {   //Create a window using JFrame with title ( Get selected JCheckBox )   JFrame frame=new JFrame("Get selected JCheckBox");     //Create layout that will be use by JFrame   GridLayout gl=new GridLayout(5,1);     //Add ActionListener to button   button.addActionListener(this);     //Set JFrame layout   frame.setLayout(gl);     //Add all created check box into JFrame   frame.add(checkBox1);   frame.add(checkBox2);   frame.add(checkBox3);   frame.add(checkBox4);     //Add created button into JFrame   frame.add(button);     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);   frame.setSize(350,200);   frame.setVisible(true);  }    //Main method  public static void main(String[]args)  {   GetSelectedJCheckBox gsjcb=new GetSelectedJCheckBox();  }  } ...

Friday, 19 July 2013

Engineering BooksLink :http://www.gobookee.net/http://www.generalfiles.o...