Forum: JSP 19 Hours Ago |
| Replies: 3 Views: 4,331 Yes:
Also I think that you can set the theme at each tag that you write. But that is not very helpful. It is better to have it in one prop file. |
Forum: Java 21 Hours Ago |
| Replies: 10 Views: 181 Can you post the part of the code where you get the exception? |
Forum: Java 21 Hours Ago |
| Replies: 4 Views: 97 You can make the method static. Like the main. |
Forum: Java 22 Hours Ago |
| Replies: 4 Views: 97 As the error says, You cannot call a non-static method inside a static method. |
Forum: Java 1 Day Ago |
| Replies: 2 Views: 118 If you search this forum you will find examples on how to:
> Read a file
> Write to a file
> Use the split method
> Create objects
> Add them to Vector or ArrayList
And to make things... |
Forum: Java 1 Day Ago |
| Replies: 11 Views: 182 |
Forum: Java 1 Day Ago |
| Replies: 1 Views: 129 For starters, use the .equals method to compare the equality of Strings and any other objects.
See what happens and I will look closely the rest of code later.
String s1 = "a";
String s2 =... |
Forum: Java 1 Day Ago |
| Replies: 7 Views: 153 I don't know, never done anything like that before. You could try to put many spaces at the first line of the file. |
Forum: Java 1 Day Ago |
| Replies: 11 Views: 182 Then why this:
powerSeries = 1 + ....
and this:
radians - powerSeries
Just calculate this in the while loop: |
Forum: Java 1 Day Ago |
| Replies: 11 Views: 182 Are you sure you have the right formula?
Also shouldn't you have this:
powerSeries += 1 +(negationFactor * (Math.pow(radians, expFact))/factorialResult); |
Forum: Java 1 Day Ago |
| Replies: 10 Views: 181 After a few search I found these:
http://support.microsoft.com/kb/313100
http://www.experts-exchange.com/Programming/Languages/Java/New_to_Java/Q_23954610.html |
Forum: Java 1 Day Ago |
| Replies: 1 Views: 107 Search the forum for examples on how to read files |
Forum: Java 1 Day Ago |
| Replies: 4 Views: 157 Before each row, meaning at the beginning of each row you need to print before the first '*' the spaces. How many spaces will depend on the row you are now. I believe it is the 'i' that counts the... |
Forum: Java 1 Day Ago |
| Replies: 10 Views: 181 I have found this link:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2691&lngWId=2
I don't know if it is helpful, but from what I understood, if the code runs at some other... |
Forum: Java 1 Day Ago |
| Replies: 10 Views: 181 Does this call executes correctly?
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Try to run it separately. If you want to get the connection you will need the above driver.... |
Forum: Java 1 Day Ago |
| Replies: 10 Views: 181 The problem is probably because it cannot find this class:
com.microsoft.jdbc.sqlserver.SQLServerDriver
when you call the Class.forName
Have you download and set to your classpath this driver:... |
Forum: Java 1 Day Ago |
| Replies: 7 Views: 153 After searching for examples on the net, I found this:
Assuming your file is like this:
And you run this:
RandomAccessFile raf = new RandomAccessFile("fileName","rw");
... |
Forum: Java 1 Day Ago |
| Replies: 7 Views: 153 I think that the RandomAccessFile (http://java.sun.com/j2se/1.5.0/docs/api/java/io/RandomAccessFile.html) might help you. |
Forum: Java 1 Day Ago |
| Replies: 7 Views: 153 I have never had to do that, but I believe there are some classes that enable you to do that. If you check the java.io API you might find something |
Forum: Java 2 Days Ago |
| Replies: 3 Views: 137 You just repeated what I just said.
Also you can have dynamic queries with Staments as I said in my post.
You can have dynamic queries with both Stament and PreparedStament but the latter is faster... |
Forum: Java 2 Days Ago |
| Replies: 7 Views: 153 One suggestion is to read the entire file and then write again what you want at the first line and the write the rest of the data read |
Forum: Java 2 Days Ago |
| Replies: 1 Views: 96 The dashed borders appear whenever you select something. If you add a lot of buttons in a frame and you click one it is natural the it will appear selected.
I believe that these dashed line are to... |
Forum: Java 2 Days Ago |
| Replies: 4 Views: 157 for-loop that adds spaces equal to the number of row currently printing.
Also use for loop to display the number of "*"
Displays N spaces
for (int i=0;i<N;i++) {
System.out.print(" ");
} |
Forum: Java 2 Days Ago |
| Replies: 6 Views: 164 What?
Wasn't this clear enough?
Who are you to demand? |
Forum: Java 2 Days Ago |
| Replies: 1 Views: 104 |
Forum: Java 2 Days Ago |
| Replies: 3 Views: 114 Check the API.
p.addActionListener(new gameinit());
The JFrame class doesn't have such method: addActionListener.
Then search the API some more to find which elements accept an ActionListener... |
Forum: Java 2 Days Ago |
| Replies: 3 Views: 114 In order for this method to execute:
public void actionPerformed(ActionEvent e)
{
Izzy.hittable();
Izzy.movement();
if(rar == 'T')
{
System.out.print("Sky High(Grand... |
Forum: Java 2 Days Ago |
| Replies: 2 Views: 161 Well since you found the number you know one of the occurrences of the number.
Assume this:
You are looking for '3'
And you find the position of the "Red" 3. So all the others 3s will be either... |
Forum: Java 2 Days Ago |
| Replies: 3 Views: 137 I would suggest to look for tutorials on all of them.
In sort:
> Statement for executing "raw" queries:
String name = "Name A";
String query = "select * from table_A where name = '" + name +... |
Forum: Java 2 Days Ago |
| Replies: 3 Views: 129 Actually you should have something like this:
int index = 0;
for (int i=0;i<array.length;i++) {
int num;
// read int number
System.out.print(num+" ");
// loop again through the... |
Forum: Java 2 Days Ago |
| Replies: 2 Views: 126 Aren't you suppose to do this:
dRetirement = keyboard.nextDouble();
dGrossPay = grossPay(dHours, dRate);
//netPay(dGrossPay, dRetirement);
Instead of this?
dRetirement =... |
Forum: Windows Vista and Windows 7 3 Days Ago |
| Replies: 40 Views: 1,873 Thanks.
But I will hold on to my Vista for now. I don't believe that I need it right now, but in the future when I decide to do a format, I will upgrade.
Your comments were very helpful. |
Forum: Windows Vista and Windows 7 3 Days Ago |
| Replies: 40 Views: 1,873 Hi everybody,
I also have a question related to this matter and I hope I am not out of topic.
Me and a friend of mine bought a year ago new PCs with Vista installed. He is been telling me that... |
Forum: Java 3 Days Ago |
| Replies: 2 Views: 171 You can check the API to see if there is a way to get the data from the table. |
Forum: Java 3 Days Ago |
| Replies: 7 Views: 206 Not quite correct when in fact there should be more arguments (3 different grades), and at the average you add the same grade 3 times.
But if your intention was for the OP to figure that out, I am... |
Forum: Java 3 Days Ago |
| Replies: 7 Views: 206 You didn't ask specific questions, nor you mentioned what you have done. Posting your assignment will give the wring impression to others. |
Forum: Java 4 Days Ago |
| Replies: 1 Views: 117 I would have used the sleep method:
// line read:
line = readLine();
// take the time at the end of the line:
lone time = ... ;
try {
Thread.sleep(time); |
Forum: Java 4 Days Ago |
| Replies: 4 Views: 177 Try to better explain your problem. What you posted is difficult to quite understand.
Also, don't tell me that your teacher hasn't showed how to write a single class with attributes and get/set... |
Forum: Java 4 Days Ago |
| Replies: 7 Views: 206 I suppose by the time you have been given this assignment your teacher has showed you how to write programs and how to run them or how to declare methods ans use them. I assume that you have some... |
Forum: Java 4 Days Ago |
| Replies: 5 Views: 175 If I understood correctly whenever you click a button you need to get a value from a "set of values" depending on the value of the radio button?
If yes then you don't need any listeners to the radio... |