How Can we add a Google like Search box in java Swing? -


i tried code dynamic list in combobox after typing not add whole word on selected item in combobox.

how can make more dynamic google search box?

you can use code dynamically update combobox using database connection.....

    //code:    string pattern=tabletcombobox.getselecteditem().tostring();     system.out.println(pattern);     //tabletcombobox.setselecteditem(pattern);      //autocompletedecorator decorator;     //autocompletedecorator.decorate(tabletcombobox);     try     {         class.forname("com.mysql.jdbc.driver");         connection con=drivermanager.getconnection(url,username,password);         statement st=con.createstatement();         string query="select * tablet";         resultset rs=st.executequery(query);         int i=1;         while(rs.next())         {             tabletcombobox.add(this, rs.getstring(1),i++);         }     }     catch(exception e)     {         system.err.println(e);     } 

Comments

Popular posts from this blog

javascript - How to bind ViewModel Store to View? -

recursion - Can every recursive algorithm be improved with dynamic programming? -

c - Why does alarm() cause fgets() to stop waiting? -