Win a copy of Head First Android this week in the Android forum!

leo tien

Greenhorn
+ Follow
since Nov 04, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by leo tien

Oh, yes. thanks Eugene.
just because I stick in the mud.
E.G.:I add a ActionListener to the component(a Button), when I prees the Button ,take place the ActionEvent .And put it into actionPerformed() method as a parameter.But if it necessary??
yes Eugene.But which condition must need Event?
for example ,ActionListener\ActionEvent:
when I add the ActionListener to the component(a button),after I press it ,it call actionPerformed() method. This is because take place ActionEvent.But in my own Listener and Event(E.G.ModelChangeListener,ModelChangeEvent),I can put the modelChange() method to the fireModelChangeListener() method, then when the model is changed ,will call fireModelChangedListener() autometicly.So the ModelChangeEvent can throw away.
I want to know when must need the EventObject and how do it's work???
Thanks.
I use Tomcat 4.0.6,,
i put my Test.java to ROOT/mysite/WEB-INF/classes
but when i run the test.jsp....the screen display as below:
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.

An error occurred at line: 1 in the jsp file: /mysites/test2.jsp
Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\_\mysites\test2$jsp.java:56: Class org.apache.jsp.testcounter not found.
testcounter counter = null;
..................
..............
18 years ago
I want get data from mySQL.
mySQL's table as following:
+---------+--------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+--------------------------+------+-----+---------+-------+
| article | int(4) unsigned zerofill | | PRI | 0000 | |
| dealer | char(20) | | PRI | | |
| price | double(16,2) | | | 0.00 | |
+---------+--------------------------+------+-----+---------+-------+
my table is :
+---------+--------+-------+
| article | dealer | price |
+---------+--------+-------+
| 0001 | A | 3.45 |
| 0001 | B | 3.99 |
| 0002 | A | 10.99 |
| 0003 | B | 1.45 |
| 0003 | C | 1.69 |
| 0003 | D | 1.25 |
| 0004 | D | 19.95 |
+---------+--------+-------+
then I get the data from it ,
......
ResultSet result;
ResultSetMetaData rs;
......
while(result.next()) {
System.out.println(result.getString(
rs.getColumnName(1)));
/*this sentence can not run.
System.out.println(result.getInt(
rs.getColumnName(1)));
*/
System.out.println(result.getString(
rs.getColumnName(2)));
System.out.println(result.getDouble(
rs.getColumnName(3)));
}
......
it display:
......
Article : pppq
Dealer :
price : 3.45
......
as you see, the problem take place: the article's data isn't "pppq", why occur this error? How can I resolve it??please help ,,,thanks....
I want get data from mySQL.
mySQL's table as following:
+---------+--------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+--------------------------+------+-----+---------+-------+
| article | int(4) unsigned zerofill | | PRI | 0000 | |
| dealer | char(20) | | PRI | | |
| price | double(16,2) | | | 0.00 | |
+---------+--------------------------+------+-----+---------+-------+
my table is :
+---------+--------+-------+
| article | dealer | price |
+---------+--------+-------+
| 0001 | A | 3.45 |
| 0001 | B | 3.99 |
| 0002 | A | 10.99 |
| 0003 | B | 1.45 |
| 0003 | C | 1.69 |
| 0003 | D | 1.25 |
| 0004 | D | 19.95 |
+---------+--------+-------+
then I get the data from it ,
......
ResultSet result;
ResultSetMetaData rs;
......
while(result.next()) {
System.out.println(result.getString(
rs.getColumnName(1)));
/*this sentence can not run.
System.out.println(result.getInt(
rs.getColumnName(1)));
*/
System.out.println(result.getString(
rs.getColumnName(2)));
System.out.println(result.getDouble(
rs.getColumnName(3)));
}
......
it display:
......
Article : pppq
Dealer :
price : 3.45
......
as you see, the problem take place: the article's data isn't "pppq", why occur this error? How can I resolve it??please help ,,,thanks....
Oh,my dear Rich..
I'm a fresh ,,,,can you say the method more detailed?? thanx a lot !
[ January 20, 2003: Message edited by: leo tien ]
thanx Mark.
i see, but when the file doesn't exist, it created by the program at runtime..the file can be created in relative path???
I have one trouble in file path...the java API said: "A pathname, whether abstract or in string form, may be either absolute or relative....."but how can I use relative path???
please help me!!!
thanks before..
i want to implement such function:
when i press a button , it can add a CheckBox on the panel and refresh it on the frame...
who can help me ....thanks a lot..
Is there such a tool, can analysis the java program...for instance ...pick up the method and show all relationship between the methods....
thanks .....