السلام عليكــم ورحمـة الله وبركاتــه
عندي مشكله في برنامجي وهويعرض صور متحركه لمجموعة كلمات تم ادخالها من المستخدم فيقوم البرنامج بالبحث عن الكلمات في قاعدة البيانات واذا وجدها عرض صورها المتحركه واذا لم يجدها يطبع حروفها والمشكله هي كيف اني اجعل بين كل عرض واخر وقت حتى لا تعرض كلهم في وقت واحد ويوجدد ايضا 2 error
ارجو المساعده عاجلا
String text;
String [] text1,text2;
System.out.println("plz enter your statement");
Scanner input=new Scanner(System.in);
text=input.nextLine();
text1=text.split(" ");
int w=text1.length;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c = DriverManager.getConnection("jdbc:odbc:oracle", "system", "123456");
Statement s = c.createStatement();
for(int n=0;n<w;++n)
{
ResultSet results = s.executeQuery(
"select path from word where name==text1[n]; ");
String location =results.getString();
ImageIcon icon = new ImageIcon(location);
JLabel lPhoto = new JLabel(icon);
setLayout(new GridLayout(1, 1));
add(lPhoto);
if(location==null)//if the word is not found in database
{
//String t= text1.getText();
int j=text1[n].length();
String result="";
int i =0;
for(i=0; i<j;i++)
{
result += text1[n].substring(i,i+1)+" \n ";
}
jLabel2.setText(result);}}
}
catch( Exception a ) {
}