Click here to Skip to main content
15,905,508 members
Home / Discussions / Java
   

Java

 
AnswerRe: project code Pin
Richard MacCutchan12-Dec-13 21:25
mveRichard MacCutchan12-Dec-13 21:25 
Questionjava .. while Pin
Ehab Obiad12-Dec-13 7:55
Ehab Obiad12-Dec-13 7:55 
AnswerRe: java .. while Pin
R.K.krishna12-Dec-13 15:48
R.K.krishna12-Dec-13 15:48 
QuestionHow to draw Shapes from MySQL Database Pin
f2611-Dec-13 23:33
f2611-Dec-13 23:33 
QuestionRe: How to draw Shapes from MySQL Database Pin
Richard MacCutchan12-Dec-13 0:13
mveRichard MacCutchan12-Dec-13 0:13 
AnswerRe: How to draw Shapes from MySQL Database Pin
f2612-Dec-13 7:48
f2612-Dec-13 7:48 
AnswerRe: How to draw Shapes from MySQL Database Pin
BobJanova12-Dec-13 5:33
BobJanova12-Dec-13 5:33 
QuestionGood books on JDBC and Java Swing? Pin
Member 1033880511-Dec-13 15:05
Member 1033880511-Dec-13 15:05 
AnswerRe: Good books on JDBC and Java Swing? Pin
Richard MacCutchan11-Dec-13 21:22
mveRichard MacCutchan11-Dec-13 21:22 
AnswerRe: Good books on JDBC and Java Swing? Pin
TorstenH.12-Dec-13 3:08
TorstenH.12-Dec-13 3:08 
AnswerRe: Good books on JDBC and Java Swing? Pin
M Riaz Bashir15-Dec-13 1:38
M Riaz Bashir15-Dec-13 1:38 
QuestionJava Code to Print JFrame or JPannel Form Contents Pin
Cyber129-Dec-13 21:41
Cyber129-Dec-13 21:41 
AnswerRe: Java Code to Print JFrame or JPannel Form Contents Pin
Richard MacCutchan9-Dec-13 22:30
mveRichard MacCutchan9-Dec-13 22:30 
GeneralRe: Java Code to Print JFrame or JPannel Form Contents Pin
Cyber1213-Dec-13 23:17
Cyber1213-Dec-13 23:17 
GeneralRe: Java Code to Print JFrame or JPannel Form Contents Pin
Richard MacCutchan13-Dec-13 23:30
mveRichard MacCutchan13-Dec-13 23:30 
GeneralRe: Java Code to Print JFrame or JPannel Form Contents Pin
Cyber1214-Dec-13 20:24
Cyber1214-Dec-13 20:24 
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 

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.