Click here to Skip to main content
15,887,404 members
Home / Discussions / Java
   

Java

 
QuestionAudio Lever Meter Pin
xchris009-Dec-13 0:27
xchris009-Dec-13 0:27 
AnswerRe: Audio Lever Meter Pin
Richard MacCutchan9-Dec-13 2:10
mveRichard MacCutchan9-Dec-13 2:10 
GeneralRe: Audio Lever Meter Pin
xchris009-Dec-13 2:15
xchris009-Dec-13 2:15 
GeneralRe: Audio Lever Meter Pin
Richard MacCutchan9-Dec-13 2:20
mveRichard MacCutchan9-Dec-13 2:20 
GeneralRe: Audio Lever Meter Pin
xchris009-Dec-13 2:26
xchris009-Dec-13 2:26 
GeneralRe: Audio Lever Meter Pin
Richard MacCutchan9-Dec-13 2:47
mveRichard MacCutchan9-Dec-13 2:47 
GeneralRe: Audio Lever Meter Pin
xchris009-Dec-13 2:58
xchris009-Dec-13 2:58 
AnswerRe: Audio Lever Meter Pin
xchris0017-Dec-13 2:30
xchris0017-Dec-13 2:30 
Ok,I managed to make it capture audio and print on a xls file the timestamp and the value of the current sample,but there is a problem : even I've put some spaces between the time and the value and it seems that they are in different columns,they are actualy on the same column of the xls,it's just expanded and covers the next column (I can put a print screen if you don't understand).How can I make it print the data of time and amplitude in two different columns?Here's my code of the class which creates the file and saves the data on xls :
Java
package soundRecording;

import java.io.File;
import java.util.Formatter;


public class Save {
	
	static Formatter y;

	public static void createFile() {
	
		Date thedate = new Date();
		final String folder = thedate.curDate();
		final String fileName = thedate.curTime();
	
	try {
		String name = "Time_"+fileName+".csv";
		y = new Formatter(name);
		File nof = new File(name);
		nof.createNewFile();
		System.out.println("A new file was created.");
	}
	catch(Exception e) {
		System.out.println("There was an error.");
		}
	}
	
	public void addValues(byte audio) {
		Date d = new Date();
		y.format("%s    " + "  %s%n",d.curTime(), audio);
	}
	
	public void closeFile() {
		y.close();
	}
}

Questionretrieving path from Mysql database to draw bezier curve on JFrame Pin
f268-Dec-13 21:10
f268-Dec-13 21:10 
AnswerRe: retrieving path from Mysql database to draw bezier curve on JFrame Pin
Richard MacCutchan8-Dec-13 22:32
mveRichard MacCutchan8-Dec-13 22:32 
Questionjava string Pin
Trupti0017-Dec-13 1:32
Trupti0017-Dec-13 1:32 
AnswerRe: java string Pin
jschell7-Dec-13 10:49
jschell7-Dec-13 10:49 
AnswerRe: java string Pin
Peter_in_27807-Dec-13 22:44
professionalPeter_in_27807-Dec-13 22:44 
Questioncode to develop main window in auto mobile spare parts Pin
Member 104492436-Dec-13 0:49
Member 104492436-Dec-13 0:49 
AnswerRe: code to develop main window in auto mobile spare parts Pin
Richard MacCutchan6-Dec-13 2:12
mveRichard MacCutchan6-Dec-13 2:12 
AnswerRe: code to develop main window in auto mobile spare parts Pin
jschell6-Dec-13 12:14
jschell6-Dec-13 12:14 
Generalcareer after bcs Pin
Member 104492436-Dec-13 0:48
Member 104492436-Dec-13 0:48 
GeneralRe: career after bcs Pin
Richard MacCutchan6-Dec-13 2:11
mveRichard MacCutchan6-Dec-13 2:11 
QuestionJFrame showing nothing. Pin
chdboy4-Dec-13 23:24
chdboy4-Dec-13 23:24 
QuestionRe: JFrame showing nothing. Pin
Richard MacCutchan4-Dec-13 23:42
mveRichard MacCutchan4-Dec-13 23:42 
AnswerRe: JFrame showing nothing. Pin
chdboy5-Dec-13 0:06
chdboy5-Dec-13 0:06 
GeneralRe: JFrame showing nothing. Pin
Richard MacCutchan5-Dec-13 0:47
mveRichard MacCutchan5-Dec-13 0:47 
GeneralRe: JFrame showing nothing. Pin
chdboy5-Dec-13 0:53
chdboy5-Dec-13 0:53 
GeneralRe: JFrame showing nothing. Pin
Richard MacCutchan5-Dec-13 0:56
mveRichard MacCutchan5-Dec-13 0:56 
AnswerRe: JFrame showing nothing. Pin
suvi from mumbai10-Dec-13 1:18
suvi from mumbai10-Dec-13 1:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.