Tony Docherty

+ Follow
since Aug 07, 2007
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Tony Docherty

The cellIndex variable is always 0 so it writes everything into column A.

For the same reason that Dave suggested you use createRow(currentRow.getRowNum()), when creating the cell, you should do something like createCell(currentRow.getColumnNum()) - I say something like because I'm away from my development environment so have guessed the name of the method for getting the column number.
2 days ago
I don't understand why you think it will copy all the tabs. If you create a new workbook (see the link I gave previously) it will be empty.

Sorry I don't have time at the moment to write code showing how to do it.
6 days ago
Sure, but if you want to copy the data and formatting into a new excel file you have to use POI to create a new excel workbook etc to copy the data and formatting into.
6 days ago
If you want to put the data into another excel workbook then you need to create a new workbook, a new sheet and populate the appropriate cells with the data. You may also need to copy over the formatting of each cell if you want that to be the same (it been a long time since I used POI and I can't remember if there is a way of copying the data and formatting at the same time).

For information on how to do all this read the help files found at
6 days ago
Because when bytes are used in arithmetic they are automatically converted to ints so the result of a + b is an int.
3 weeks ago
You can explicitly cast to a narrower type but the compiler won't automatically do it for you. So if y was an int you would get a compilation error unless you explicitly cast x to an int.
3 weeks ago
2 is an int and x is a long so 2 gets converted to a long and then the multiplication occurs.
3 weeks ago
Converting from an int to a long is a widening conversion and that is allowed because an int will always fit into a long without any losses.

It's explained in the JLS under widening conversions on page but be warned the JLS can be difficult to read.
3 weeks ago
My pleasure.

I suggest you add a "LED" style component to your GUI which turns green when recording has started.
3 weeks ago

Aubrey Bourke wrote:Are you sure its working properly for you?


Aubrey Bourke wrote:A simple test is the start recording and say "1 2 3 4"
When I play the file I get "2 3 4"

Exactly what I did and I get "1 2 3 4". As I said there is a short delay before the system is ready to record so I have to wait a few hundred milliseconds before starting.
3 weeks ago
org.apache.commons.lang.StringEscapeUtils has methods for escaping and unescaping (is that even a word!) unicode for csv, html, xml ectc
3 weeks ago
It works for me.
I suspect the problem you are having is the time it takes to set up the audio subsystem. On my system it takes a couple of hundred milliseconds from pressing the button to getting the TargetDataLine object running. It may be that it is considerably slower on your system. You could try putting some System.out.println(""); statements in your run method so you can visually see when you have an initialised sound system - you could add some calls to System.currentTimeMillis() if you want to see how long it is actually taking.
3 weeks ago
BufferedInputStream has a method which returns the number of bytes read in so you could repeatedly call the read method using the previously returned value to adjust the off (offset at which to start storing bytes) and len (the maximum number of bytes to read in) variables until you have a full buffer.
4 weeks ago
Have you tried changing the default font (Preferences → General → Appearance → Colors and fonts → Basic/Text Font) to a standard font to see if the problem still occurs.
1 month ago