David Coello

Greenhorn
+ Follow
since Jun 05, 2012
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 David Coello

Hello Forum Members, thank you for looking at my project.

I am in the process of creating a GUI for a customer order of plastic bags. I am aiming for a final presentation of a gui I am including in the attachment.

I have a list field but need to change to a text field where I want to display the results of the customer selection when the View Order button is pressed. I also have a Cancel button and want to bring all fields to no option being selected.

I appreciate your help, as I am having difficulty integrating the text field into the frame and also how to put the results into de text field. Thank you.

My code so far is:


7 years ago
Hi, well I thought of another quick question. When I run the applet on Eclipse, the labels are all over the applet.

1.- Is there a way to organize the applet contents, like in columns or rows.
2. Is there a way to move the second part of the applet. (name, gender, age, etc.), I would like to move it down a little to make more room for the labels.

Your help is really appreciated.

Thank you.

David
7 years ago
Thank you so much Paul and Naishadh for your help; I actually played around with the code before posting for help and almost got to that same code, but this worked perfect, thank you I appreciate it!!
7 years ago
Hello forum members,

I am currently working on an applet and need to include a clear or reset button and have researched with no solution found. I want to reset the name text field to be blank and ready to receive a new name.

Any help is appreciated. Thank you.

My code as follows:

7 years ago
Hello,

I am building a chatterbot for a school project and am looking for a way to do the following:

1. Match any word from the inputline with a string in an array.

If someone types "Hello stranger", I want to find the array string that says "Hello". If a match is found, I want to reply "Greetings".
If then someone types "How are you today", I want to find the array string that says "you today". If a match is found, I want to reply "Great".

And try to create a conversation going.

I am not sure if to use a match regex function or contains function.

This is my code:





Thanks so much for your feedback.

David
7 years ago
Hello,

I am a new Java Developer. I am currently working on a Chatbot for school and so far I have created 2 main segments. First, I have the chatbot working at least ready for input and with 2 possible replies. The assignment requires me to have the conversation oriented towards a job interview, so I wrote the following:



I would like the database to be integrated with the main program and when the user enters a keyword like "job", or "hello", to retrieve and present that containing phrase from the database. I know I need some kind of array, a match or search and match, and a random function to choose an a reply.

My main statement:




Any help or guidance is greatly appreciated.

David
7 years ago
Wow, thank you so much for both explanations. I have seen some tutorials online to create GUI's using Netbeans and the way that a GUI is created from a visual standpoint is easier to understand and position text boxes for example.

I'll give it a try to at least see how it feels to work with these tools, but definitely understand the value of programming from the command line and I actually find it both interesting and challenging. Thank you.
7 years ago
Hello forum members,

I am a new java developer. I have been working on a Converter from Farenheit to Celsius with the push of a button. I programmed it under those specs, but I would like to program that same button to convert back to celsius. I appreciate your comments, basically if a button can perform 2 actions, convert from Fahrenheit to Celsius and Celsius to Farenheit.


Thank you.

David

7 years ago
Hello forum members,

I am a new Java developer and have seen tutorials where the programmers use the NetBeans IDE and this program looks like a great tool to both write the code, compile and it has a user nice GUI.

I would appreciate your comments as to where to download this program and main uses of the program. and if this tool can be used to create all java programs.

I look forward to your comments.

Thank you.

David
7 years ago
Thanks Buenny, I also found a nice tutorial and it has some examples.

http://java.sun.com/developer/onlineTraining/awt/contents.html#AWTTextArea

I found this helpful.

Greetings,

David
7 years ago
Hello forum members,

I am a new Java developer and am learning about AWT to work on a class assignment for a Fahrenheit to Celsius temperature converter.

I found the following tutorial about AWT http://www.ged.fi/DesignPatterns/, and would appreciate your suggestions about any good tutorials for AWT that can break down on how to create a user interface.

Thank you.

David
7 years ago
Hello Buenny, Jack, Steve and thank you for your suggestions.

I started to implement the Scanner.hasNextDouble() method. I used a while loop to check if not doubles; used it 2 times, first to check the amount due and then to check the amount tender.

It seems that there are some issues with my code, as when I run the program it asks for the amount due, I enter a number, and then it does nothing, until I enter a second number. It looks like the while loop takes the second entry to check if it is a double. I suspect the same with the second while loop.

Also, in the even when a non double is entered, I would need to store a new amount due / tender and display it, and use it to calculate the change to the customer. I am confused, since a new amount due would have to go down a paralell path as the original code to calculate change, maybe using an if (newamountdue == null) to see if a new amount due was entered.

Or just assign the new value to the same "due" double, I don´t know if that can be achieved, I´ve tried and says a value to the variable due is already assigned.

I look forward to your comments and thanks in advance.

David

7 years ago
Hello forum members, I am currently working on a class assignment to display change for a simulated purchase.

I have a working program that displays dollars, quarters, dimes, nickles and pennies.

There is a needed feature, to identify non-numeric characters and I am lost as to how to achieve this.

So far, if when asked for amount due, if I put in letters, I get the following:
java.util.mismatchexception

Is there a specific code or check I can do to identify letters are entered and to say "please input numbers only".

My code is as follows:

[/code]
7 years ago
Hi Junilu, so to understand, basically what you are saying is define what tasks need to be completed, then create individual methods for each task? I also need to practice adding comments while creating the code, do you recommend that?

Thank you,

David
7 years ago
Hi Fred, should I be using Dreamweaver to achieve the code tags with their corresponding color? They definitely stand out and look like a big help while creating the program.

Thanks!!

David
7 years ago