Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

John-Philippe Verger

Greenhorn
+ Follow
since Feb 18, 2008
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 John-Philippe Verger

Thanks Rob Camick for your reply. In this reply, you've written:
" whenever the UnitPrice or Quantity is changed you recalculate the Total". But my problem is that I don't know how to detect that the user has modified the Qty column (or the UnitPrice column). As I've already written in my first post in this thread, I would want to be able to detect that the user has added a character in the Qty column (or in the UnitPrice column). Please, how could I detect that the user has added a character in the Qty column?
6 years ago
Hi Experts,

I have a JTable with 5 columns, named: "ID", "Name", "UnitPrice", "Qty", and "Total". Only the columns UnitPrice and Qty are editable by the user. When, for example, for a row in the JTable, the user types 5000 in the UnitPrice column, and types 15 in the Qty column, I would want that when he types the first character in the Qty column (i.e. the character 1) in the Qty column, the Total column displays 5000*1, in other terms 5000. And when the user types the second character in the Qty column, i.e the character 5, after having typed 1, the Total column should display 5000*15, in other terms 75000. So, to say it concisely, I would want that the Total column refreshes accordingly each time the user types a character in the Qty column. I have tried to use the MouseClicked event of the JTable, but noticed that that does not solve my problem. Please, is there an event I should use to refresh my Total column? Or should I proceed in another fashion?

Thanks in advance for your suggestions and answers.
6 years ago
Hi Experts,

My question is related to combo boxes.
A combo box in general is a text field with a dropdown list. I would want to know if we can replace hthe dropdown List by an other component, for example a JTable component.
Thanks.
6 years ago
Hi all,

I have a question about domain name.

First, I would want to say that I am I want to create a web site about Senegal country.

My question is the following: I would want to know if it is possible to have a web site hosted in France but with a domaine name ending with .sn (.sn is for Senegal).


Thanks.
7 years ago
Hi,

I have learned Spring. But I´m wondering if I can say that I know also Spring MVC.
In other terms, I would want to know if Spring MVC is a part of Spring or if Spring MVC is completely different of Spring.


Thanks.
7 years ago
Hi,

Please, I would want to know if the people using ADF (Application Development Framework) use more Weblogic than Oracle Application Server (for their Application SErver).


Thanks.
7 years ago
Hi,

I hope I'm posting in the right forum.

I'm learning Servlets and JSP with HFSJ. Somewhere in this book, I read this:

on the client’s first request, the Container generates a unique session ID and gives it back to the client with the response. The client sends back the session ID with each subsequent request.

I have the following question to ask on it:

Even if cookies are enabled on the client, what ensures that the client will effectively send back the session ID with each subsequent request? Can't it be possible that, even if cookies are enabled on the client, the client doesn't send back the session ID with subsequent requests?
9 years ago
Hi,

I don't know if it's the right forum to ask my question.

I would want to know how,on JavaRanch, a member becomes RanchHand or Bartender; is there a system of points such that a member who initiates a thread can "grant" points to someone who has answered well to his question (to the question of the member who initiates a thread)?


Thanks.
10 years ago
HI Mike Simmons,

I add the all debugging lines of code you suggested between the line 7 of the source file of my first post(the line arr = new ArrayList<String>();) and the line 8 of the source file of my first post(the line for (int j = 0;j < f.listFiles().length;j++) {), and after having compiled and executed, I got the following output:
C:\ - Full path of f: C:\
Full path of f: C:\145c1fac119461cbd6927070f9
Full path of f: C:\145c1fac119461cbd6927070f9\amd64
Exception in thread "main" java.lang.NullPointerException
at AllFiles2.AllF(AllFiles2.java:14)
at AllFiles2.AllF(AllFiles2.java:21)
at AllFiles2.AllF(AllFiles2.java:21)
at AllFiles2.main(AllFiles2.java:37)

Thanks.
10 years ago
Thanks Paul Clapham for your second reply. In your reply, you wrote:

I don't see any code which prints "C:\", so I don't know where that is coming from

.
Here's my answer:
In the output of the JVM I showed in my first post, the first line was:
.
That is why I think the is displayed by the line 30 of the source file I showed in my first post.And when I remove the lines 31, 32,33,34 and 35 of of the source file I showed in my first post, the source file is compiled successfully and the output when I launch the resulting class file is fine:
.
So, it seems like at line 29 in the the source file I showed in my first post, File.listRoots() is an array of two elements (the first element corresponding to the physical directory C:\ ,and the second directory corresponding to the physical directory D:\), and the program outputs C:\at line 30 of the source file I showed in my first post and for the first iteration in the for loop of the main method . So, fi at line 30 for the first iteration of the for loop of the main method refers to the physical directory C:\. Consequently, at line 31 for the first iteration of the for loop of the main method in the the source file I showed in my first post,the method AllF(fi) should give me all the files (physical files and physical directories) of the partition C:\, but it's like that is there that problems began.
Thanks.
10 years ago
Thanks, Paul Clapham, for your reply. After your reply, I inserted these two lines of code between the line 7 and the line 8 of the program shown in my first post.


The resulting source file compiles successfully, and when I execute the resulting class file, I get now:
[code] C:\ - f.listFiles() is null
Exception in thread "main" java.lang.NullPointerException
at AllFiles2.AllF(AllFiles2.java:8)
at AllFiles2.AllF(AllFiles2.java:15)
at AllFiles2.AllF(AllFiles2.java:15)
at AllFiles2.main(AllFiles2.java:31)[code]
But I don't understand why f.listFiles() is null, since my partition C:\ has lot of physical files and directories in it.
10 years ago
Hi,
I'm trying to write a program which outputs all the files on my machine(and their respective sizes).In the output, I want to have one line by file.
Here's the class AllFiles2.java I wrote for that.


The class AllFiles2 above compiles successfully.But when I execute the resulting class file, I have a NullPointerException. I don't understand why I have a NullPointerException.Here's the complete output I receive when I execute AllFiles2.

C:\ - Exception in thread "main" java.lang.NullPointerException
at AllFiles2.AllF(AllFiles2.java:8)
at AllFiles2.AllF(AllFiles2.java:15)
at AllFiles2.AllF(AllFiles2.java:15)
at AllFiles2.main(AllFiles2.java:31)

Note: I use Windows XP, and I have 2 partitions on my disk: C:\ and D:\.

Please, why, although the program is able to execute the line (at line30,in the for loop of the main method) and outputs'C:\ - ' , it sees at the line which follows(the line 31 ) that fi does not refer to an object?

Thanks.
10 years ago
Hi all,

I am developping a Web application with Servlets/JSP and Javascript, and I have the following requirement:
On the client(user) of the Web application,there is a scanner which
is connected to the client machine and when the user puts a document (such as a paper containing text and images) on the surface of the scanner, he can click on a button on a form of the Web application and this click must trigger the scanning process and the file resulting of the scanning must be placed in a folder of the client machine (let's say this folder is D:\Images).
Please , how can I solve this problem using Javascript??
Thanks you in advance for your answers.
Hi all,
I have an html form , and there is a table of eight rows and two columns in this form .The name of the form is Collect_Form, and I use the method POST to post the form Collect_Form to a servlet named ProcessingServlet .
I would want that when a user selects(or clicks) a row of the table, the form is posted to the servlet (I don't want the user to be obliged to click on a submit button every time he has to select or click a row of the table).
How can I achieve this?
Thanks you.


Thanks you Bear Bibeault for the reply. But, please ,can I have more concrete information on how to put hidden inputs in the code for the html table?
12 years ago
JSP