Hi,
I am creating a JTable dynamically using TableModel and
adding the columns dynamically to that table and after that adding the table in jScrollpane. I am able to set the width of the colums also using setPreferredWidth() but the whole width of the table is comming same. please let me know how can I set the whole width of the table dynamically
How can i query a db table to output entries starting with a particular alphabet.ex.i have this app that i developed using GUI.i created a dialog which enables the user to search for an entry by inputting the name into a txtfld n hitting the "search" button.but the thing is what if the user wants to only display only names starting from an alphabet like say "y" so he types only "y" in the textfld.all i get is an error.i wrote this line in ma code:
String str = "SELECT * FROM table_name WHERE column_name LIKE column_name = ? + ''%";
all i get are errors even when i changed it.please help me out here all i need is that line of code that outputs all the data that starts with the alphabet inputted by the user in the txtfld.
Please can u send it to my mail listed above.i'd appreciate it
Dynamically adjust width of a JTableDibyojyoti April 3, 2012 at 12:56 PM
Hi, I am creating a JTable dynamically using TableModel and adding the columns dynamically to that table and after that adding the table in jScrollpane. I am able to set the width of the colums also using setPreferredWidth() but the whole width of the table is comming same. please let me know how can I set the whole width of the table dynamically
Db queryAndre jonn August 1, 2012 at 12:40 AM
How can i query a db table to output entries starting with a particular alphabet.ex.i have this app that i developed using GUI.i created a dialog which enables the user to search for an entry by inputting the name into a txtfld n hitting the "search" button.but the thing is what if the user wants to only display only names starting from an alphabet like say "y" so he types only "y" in the textfld.all i get is an error.i wrote this line in ma code: String str = "SELECT * FROM table_name WHERE column_name LIKE column_name = ? + ''%"; all i get are errors even when i changed it.please help me out here all i need is that line of code that outputs all the data that starts with the alphabet inputted by the user in the txtfld. Please can u send it to my mail listed above.i'd appreciate it
Post your Comment