public RoomFrom() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(0, 122, 528, 505);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);


		txt_idroom = new JTextField();
		txt_idroom.setEditable(false);
		txt_idroom.setBounds(219, 58, 78, 22);

		txt_Floor = new JTextField();
		txt_Floor.setBounds(219, 114, 148, 22);

		txt_roomName = new JTextField();
		txt_roomName.setBounds(219, 86, 148, 22);

		Label label = new Label("RoomID");
		label.setBounds(56, 58, 84, 22);

		Label label_1 = new Label("Floor");
		label_1.setBounds(56, 114, 84, 22);

		Label label_2 = new Label("roomName");
		label_2.setBounds(56, 86, 84, 22);

		Label label_3 = new Label("RoomStatusID");
		label_3.setBounds(56, 142, 127, 22);

		Label label_4 = new Label("roomNoOfAdult");
		label_4.setBounds(56, 170, 115, 22);

		txt_roomNoOfAdult = new JTextField();
		txt_roomNoOfAdult.setBounds(219, 170, 148, 22);

		txt_roomNoOfChild = new JTextField();
		txt_roomNoOfChild.setBounds(219, 198, 148, 22);

		Label label_5 = new Label("roomNoOfChild");
		label_5.setBounds(56, 198, 127, 22);

		txt_roomFee = new JTextField();
		txt_roomFee.setBounds(219, 226, 148, 22);

		cb_roomStatusID = new JComboBox();
		cb_roomStatusID.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
			}
		});
		cb_roomStatusID.addItemListener(new ItemListener() {
			public void itemStateChanged(ItemEvent arg0) {
				String statusID = ((KeyValue) cb_roomStatusID.getSelectedItem()).getKey();
				txt_roomStatusID.setText(statusID.toString());
			}
		});
		cb_roomStatusID.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				String statusID = ((KeyValue) cb_roomStatusID.getSelectedItem()).getKey();
				txt_roomStatusID.setText(statusID.toString());
			}
		});
		cb_roomStatusID.setBounds(219, 142, 148, 22);
		contentPane.add(cb_roomStatusID);


		Button button = new Button("Add");
		button.setBounds(166, 427, 70, 22);
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				ConnectData ds=new ConnectData();
				ds.connect();					
				int floor=Integer.parseInt(txt_Floor.getText());
				String roomName=txt_roomName.getText();
				int roomNoOfAdult=Integer.parseInt(txt_roomNoOfAdult.getText());
				int roomNoOfChild=Integer.parseInt(txt_roomNoOfChild.getText());
				int roomStatusID=Integer.parseInt(txt_roomStatusID.getText());
				int roomFee=Integer.parseInt(txt_roomFee.getText());
				//String sql_insert="insert into Room values('"+idroom+"','"+roomName+ "','"+ floor+ "','" +roomStatusID+"','"+roomNoOfAdult+"','"+roomNoOfChild+"','"+ roomFee +"')";
				String sql_insert="insert into Room values("+ null +",'"+roomName+ "','"+ floor+ "','" +roomStatusID+"','"+roomNoOfAdult+"','"+roomNoOfChild+"','"+ roomFee +"')";
				if(ds.queryExcuteUpdate(sql_insert))
				{
					JOptionPane.showMessageDialog(null,"Successfull");
					showTable();
				}
				else

					JOptionPane.showMessageDialog(null,"fail");

				try {
					ds.dispose();
				} catch (SQLException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				}
			}
		});

		Button button_1 = new Button("Delete");
		button_1.setBounds(297, 427, 70, 22);
		button_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				ConnectData ds=new ConnectData();
				ds.connect();
				String roomID=txt_idroom.getText();
				String sql_insert="delete from Room where roomID='"+roomID+"'";
				if(ds.queryExcuteUpdate(sql_insert)){
					JOptionPane.showMessageDialog(null,"delete Successfull");
					showTable();}
				else
					JOptionPane.showMessageDialog(null,"delete fail");

				try {
					ds.dispose();
				} catch (SQLException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				}
			}
		});

		Button button_2 = new Button("Update");
		button_2.setBounds(414, 427, 70, 22);
		button_2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				ConnectData ds=new ConnectData();
				ds.connect();					
				int idroom= Integer.parseInt(txt_idroom.getText());
				int floor=Integer.parseInt(txt_Floor.getText());
				String roomName=txt_roomName.getText();
				int roomNoOfAdult=Integer.parseInt(txt_roomNoOfAdult.getText());
				int roomNoOfChild=Integer.parseInt(txt_roomNoOfChild.getText());
				int roomStatusID=Integer.parseInt(txt_roomStatusID.getText());
				float roomFee= Float.parseFloat(txt_roomFee.getText());

				String sql_insert="Update Room Set roomID="+idroom+",roomName='"+roomName+ "',roomFloor="+ floor+ ",roomStatusID=" +roomStatusID+",roomNoOfAdult="+roomNoOfAdult+",roomNoOfChild="+roomNoOfChild+",roomFee="+ roomFee +" where roomID=" + idroom ;
				if(ds.queryExcuteUpdate(sql_insert))					
				{
					JOptionPane.showMessageDialog(null,"Successfull");
					showTable();
				}
				else					
					JOptionPane.showMessageDialog(null,"fail");

				try {
					ds.dispose();
				} catch (SQLException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				}				
			}
		});
		contentPane.setLayout(null);
		contentPane.add(label);
		contentPane.add(txt_idroom);
		contentPane.add(label_1);
		contentPane.add(txt_Floor);
		contentPane.add(label_2);
		contentPane.add(txt_roomName);
		contentPane.add(label_3);
		contentPane.add(label_4);
		contentPane.add(txt_roomNoOfAdult);
		contentPane.add(label_5);
		contentPane.add(txt_roomNoOfChild);
		contentPane.add(txt_roomFee);
		contentPane.add(button);
		contentPane.add(button_1);
		contentPane.add(button_2);

		Label label_6 = new Label("roomFee");
		label_6.setBounds(56, 226, 62, 22);
		contentPane.add(label_6);

		JLabel lblNewLabel = new JLabel("Room Management");
		lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 20));
		lblNewLabel.setForeground(SystemColor.desktop);
		lblNewLabel.setBounds(166, 11, 230, 29);
		contentPane.add(lblNewLabel);

		JScrollPane scrollPane = new JScrollPane();		
		scrollPane.setBounds(10, 264, 500, 136);
		contentPane.add(scrollPane);

		table = new JTable();
		table.addKeyListener(new KeyAdapter() {
			@Override
			public void keyReleased(KeyEvent arg0) {
				comboUpdate();		
			}
		});
		table.setBackground(new Color(255, 255, 153));
		table.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				comboUpdate();			       			
			}
		});

		scrollPane.setViewportView(table);
		JButton btnNew = new JButton("New");
		btnNew.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {

				txt_idroom.setText("");
				txt_roomName.setText("");
				txt_Floor.setText("");
				txt_roomStatusID.setText("");
				txt_roomNoOfAdult.setText("");
				txt_roomNoOfChild.setText("");
				txt_roomFee.setText("");
			}
		});
		btnNew.setBounds(40, 427, 78, 23);
		contentPane.add(btnNew);	
		
				txt_roomStatusID = new JTextField();		
				txt_roomStatusID.setEnabled(false);
				txt_roomStatusID.setEditable(false);
				
						txt_roomStatusID.setBounds(219, 142, -22, 22);
						contentPane.add(txt_roomStatusID);
						
						this.setClosable(true);
						  this.setMaximizable(true);
						  this.setVisible(true);

						  this.setResizable(true);
						  this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
						    
						  showTable();
							showCombo();		
							table.selectAll();
							comboUpdate();
	}