- Upvotes Received
- 3
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
6 Posted Topics
I think,you should use following code if you are using Recordset: dim rs as new adodb.recordset rs.open "select * from employee where emp_id='"& txtemplid.text &"'",con,adopendynamic if rs.EOF=true then ' ' 'insert code for Record insertion ' ' end if
If rs1.EOF = False Then Text2.Text = rs1!balance Else Text2.Text = "" MsgBox ("Invalid account number") End If
Use following code: public void mouseClicked(MouseEvent e) { if (jTable1.getRowCount()>0) { jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); int rowIndex = jTable1.getSelectedRow(); int colIndex = jTable1.getSelectedColumn(); jTextField1.setText(jTable1.getValueAt(rowIndex,colIndex)); } }
Add this Jar file: mysql-connector-java-5.1.21-bin to the Library. It may help you
jDateChooser which comes with jCalendar is the best component for date: Following is the way to get date from date picker: //dat is name given to datepicker component int day=dat.getJCalendar().getDayChooser().getDay(); int month=dat.getJCalendar().getMonthChooser().getMonth(); int year=dat.getJCalendar().getYearChooser().getYear(); String dateNow=year+"/"+month+"/"+day; System.out.println(dateNow); //*************************************************** //For setting date of date picker: dat.setDateFormatString("dd-MM-yyyy"); Calendar currentDate = Calendar.getInstance(); dat.setDate(currentDate.getTime());
It is due to the Layout of frame. While designing frame,you might have set size of components accoding position of other components.
The End.