Jagan Reddy

Greenhorn
+ Follow
since Nov 11, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Jagan Reddy

Hi,
I think this code might help u out.
for(int i=0;i<table.getRowCount();i++) { //table is the name of ur JTable

String sbValues = "insert into table values(";//table is the name of the table in the database where data is to be inserted
String sbData = "";

for(int j=0;j<table.getColumnCount();j++) {
String s2 =(String)table.getValueAt(i,j);
if(s2==null)
s2 = "";
sbValues+=s2+",";
}
sbData+=sbValues.substring(0,sbValues.length()-1)+")";
statement.executeUpdate(sbData); //statement is ur statement object.
}
23 years ago
Hi All,

I have a small doubt. I have a java file named "HELLO.java". I am able to compile it as "javac hello.java".Though java is case sensitive i am able to get the class file.But i am not to run it as "java hello" and i have execute the class file as "java HELLO".
How is this possible???
Thanx in advance.
Regards,
Reddy.



23 years ago
Hi,
I am new to XML. Can anybody suggest me some good sites of how to use XML parsers like SAX or DOM and some sample of how to use them.

Thanx in advance..
Regards,
Reddy.
Hi,
By default Frame is border layout and centered.change the layout to flow layout and left aligned. That solves your problem.
Regards,
Jagan Reddy
23 years ago
Hi,

Add the TableModelListner to your table.
get the selectedRow using getSelectedRow()
get the selectedColumn using getSelectedColumn()..
Depending upon your requirement of the row and column fire your events..
If this is what you want,then i hope this solves your problem..
else can you be much more clear in your question.
Regards,
Jagan Mohan Reddy
23 years ago
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#editrender. refer TableDialogEditDemo.java example.
The above gives an examples of how to use different editors on a column. If u can make use of a text area i think your problem of multi line can be solved.
Regards,
Jagan Mohan Reddy.
23 years ago
Hi Jeff,

Instead of using list.requestDefaultFocus() use

menu.requestDefaultFocus(). I tried out and is working ..
Regards,
Jagan Reddy.

23 years ago