User Profile
Collapse
-
I don't know why it worked in my IDE and honestly wish it didn't. It would have saved me from having to write it twice. Maybe has something to do with Strings being immutable... -
response.sendRe direct( ) was what i needed to do, Instead of trying to recreate the page I just needed to redirect back to the front end, the logic and session took care of the rest. As usual I was looking for the problem in the wrong place
Thanks for your replies.Leave a comment:
-
Servlet deployment problems
My assignment was to create a shopping cart servlet, it works locally on tomcat but when I deploy it to the schools server (also tomcat) it fails to refresh the front page and just prints the HTML Code not the page. Any thoughts or a helping hand would be appreciated.
...Code:import java.io.*; import java.net.*; import java.text.NumberFormat; import java.util.*; import javax.servlet.*; import javax.servlet.http.*;
-
bubble sort help.
I am trying to sort an array by name ( that works) but I only need each sorted name to show up once, regardless of how many times it shows up in the sort. Where do I go from here?
...Code:public class Report { Rental[] rentals = new Rental[20]; /** Creates a new instance of Report */ public CustomerReport() { } public Rental[]sort(Rental[] rentals) { Rental[] newRentals -
Can anyone help me figure out how to nest the for loops I need to increment the red green blue by 1 each time it draws a new rectangle ?
for some reason netbeans can not find the symbols red, blue, green.
package nestedsquare;
import java.awt.Color;
import java.awt.Graphi cs;
import javax.swing.JPa nel;
public class DrawSquares extends JPanel
{
public...Leave a comment:
-
-
I looked in the API but can't find anything on it where can I go to learn about the fillRect function?Leave a comment:
-
256 colorful nested squares only without the color...help
I am using swing to nest squares with in squares (256 times) and that part is working fine, but what i want to do is change the color of each line so that the red green and blue components each increment by 1 each time the next line is drawn. I really never used jpanel or jframe much less swing. any help I coulg get would be appreciated.
Thanks in advance.
here is the code i've got thus far
...Code:package nestedsquare;
-
Yes I did, but I actually figured it out and it is working, that was close to what I got.
thank you for the reply...Leave a comment:
-
using indexOf to count the number of times a letter occurrs?
Is there a way to use index of in java to pull the number of occurrences of every letter in a user defined sentence? I can brute force this but is there a faster more elegant way to achieve the same result. I've started to try this but not sure I am on the right track. any help or push in the right direction would be appreciated.
...Code:import java.util.StringTokenizer; import java.util.Scanner; public class
-
-
I've got to take my wife to dinner but I wanted to thank you for your reply again I'll be trying this when I return home. thanks again horace1, I think I should have tried posting a long time ago....Leave a comment:
-
Thank you for the help horace1,
If I understand correctly I can set the delimeter in the Scanner.
Should it look like thisOr am I way off track?...Code:Scanner input = new Scanner( / , System.in );
Leave a comment:
-
Help getting user input into my fraction calculating program.
I am very new to programming as well as Java and this is my first post so please forgive me if this is not quite posted correctly. My Problem is that I have only been using scanner to get user input into most of the exercises I have done. This exercise is asking for a user to enter two fractionslike "1/3" or "5/8". Scanner doesn't work and I don't know of another way to get this done. I think that I will have to somehow strip...
No activity results to display
Show More
Leave a comment: