Search:
Type: Posts; User: jcaccia
Search:
Search took 0.03 seconds.
-
October 18th, 2017, 09:35 AM
Ok, this is not exactly the same asor your other post with a sample of what you wanted as a table with apparently just 2 columns.
So, starting with this table:
| Col 0 | Col 1 | Col 2 | Col 3 |...
-
October 18th, 2017, 02:41 AM
I thought you have 7 columns and want to remove columns 2 to 6. That means leaving the first and last columns, which is what you should get with my code sample. But now you say it is not removing the...
-
October 17th, 2017, 10:14 AM
but it didn't work, and there were a couple of versions with different starting values for col and the argument for .getColumn. According to your post #11 you "got rid of the 2nd column,but can’t get...
-
October 17th, 2017, 03:41 AM
Can you post the code you have now?
-
October 13th, 2017, 09:06 AM
The column indexes are 0 based, so the 2nd column would be column 1.
-
October 13th, 2017, 05:08 AM
Is it the original column #2 that is not deleted or a column that shows now in the second position after deleting them?
The correct code should be:
for (int col = 1; col < 6; col++) {
...
-
October 12th, 2017, 09:32 AM
By the way, that code prints a solid rectangle. To print a hollow rectangle as required you should first print the top line (all *), then a series of lines consisting of an * at each end and spaces...
-
October 9th, 2017, 03:40 AM
The if does not have a string as its only statement. It has two statements, both setting session attributes (balance and formattedBal). The error complains about the use of = (assignment) instead of...
-
September 20th, 2017, 03:12 AM
You keep the balance in an instance variable, so every time the servlet is instanciated a new variable is created (and initialised to 0.0).
If you changed the balance to a static variable then all...
-
Where are you adding the menu options (File, Book, etc) in MyMenuBar?
Please follow the Java naming conventions more consistently (variable/method names start in a lowercase letter).
-
June 26th, 2017, 06:00 AM
Have you considered using JFormattedTextField instead of JTextField? You can forget about filtering and formatting. Have a look at the Java Tutorial (I wanted to post the link, but it errors every...
-
July 11th, 2016, 04:24 AM
Think of what the program is reading. You type a single letter and then the enter/return key. The program sees two additional characters after the letter you typed corresponding to the enter key...
-
October 16th, 2015, 11:33 AM
Strings[] args? Didn't you mean String[] args?
-
June 19th, 2013, 11:49 AM
This might sound like a stupid question but, what version of Java are you using? Scanner was introduced in 1.5.
-
When comparing objects (Strings in particular) == tests for identity (ie, if the references compared refer to the same object); to test equality use the equals method. In this case you can also use...
-
Java is a case sensitive language, so String is not the same as string (also notice it's System, not system).
The convention is to capitalise class names (Hello instead of hello), and use...
-
April 2nd, 2013, 05:16 AM
This is still Javascript, not Java. Please use the appropriate forum (scripting).
-
March 27th, 2013, 07:22 AM
This is a Java forum. Java is not the same as javascript. Please use a scripting forum.
-
March 12th, 2013, 11:15 AM
Or why not using the more suitable and standard ISO codes? (see ISO 3366 and ISO 4217)
-
March 1st, 2013, 04:47 AM
You call the split method to divide the string in portions (words) separated by a space character, which will produce an array of strings. The number of elements in this array depends on the number...
-
February 28th, 2013, 04:46 AM
The exception is thrown in this line:
String lname = details[1];
because you are assuming that details will have (at least) two elements. I guess you expect the string read from the scanner three...
-
February 22nd, 2013, 04:57 AM
I would just use a for loop, going from 0 to half the length of the string, using it as an offset from both ends of the string and compare the characters in those positions. You can stop when the...
-
February 20th, 2013, 07:59 AM
In line 13 of the Grid class (where the exception is thrown) you are invoking the setValue method on an element of the playerBoard array, but the elements in this array are not initialised before...
-
February 13th, 2013, 05:19 AM
If you are running your program in Windows you need to use cmd for the shell instead of ksh. You also need to pass /C as an option to cmd so it runs the command (ie your shell script) and terminates,...
-
February 7th, 2013, 07:31 AM
You need to save the values in variables in the enum using an appropriate constructor. For instance, if you wanted to have an enum for the grades with their corresponding points you could do...
|
Click Here to Expand Forum to Full Width
|