In the validateLog() method, the prepared statement only has 2 placeholders, but you're supplying data to indices 2 & 3.
The index for placeholders starts from 1 ![]()
Not Telling
Angex hasn't added any contacts yet.
05 May 2013 - 01:18 PM
In the validateLog() method, the prepared statement only has 2 placeholders, but you're supplying data to indices 2 & 3.
The index for placeholders starts from 1 ![]()
10 January 2013 - 02:24 PM
Are you using 64bit version of Eclipse & Java VM?
It looks like Slick2D is trying to load 32bit native dll's.
LWJGL does provide 64bit builds; but you will probably need to modify your Slick2D build to load them.
25 August 2012 - 01:50 PM
18 August 2012 - 03:44 AM
import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener;
task.addPropertyChangeListener(
new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (task.getState() == StateValue.DONE) {
try {
selectedFileHolder = task.get();
} catch (InterruptedException exp) {
exp.printStackTrace();
} catch (ExecutionException exp) {
exp.printStackTrace();
}
}
}
}
);
17 August 2012 - 04:32 AM
class FileProcessor extends SwingWorker<File, Integer>
In the constructor of FileProcessor, you need to store the object reference to "INPUT" as anIt keeps telling me INPUT isn't recognized in the FileProcessor class.
This can be done using "publish/process" methods of SwingWorker.How would I get counter in FileProcessor to constantly update to outerTextArea in class X?
private File INPUT;
private JTextArea innerTextArea;
FileProcessor(File INPUT, JTextArea innerTextArea) {
//initialize
this.INPUT = INPUT;
this.innerTextArea = innerTextArea;
}
while(somecondition==condition)
{
//processing stuff
counter++;
publish( counter ); // Tell the GUI about counter.
}
@Override
protected void process(List<Interger> chunks) {
for (Integer i : chunks) {
innerTextArea.append("counter = " + i + "\n");
}
}
There are at least 3 differrent ways todo this. The best way depends on what you want to do with "convertedFile".How do I get convertedFile in FileProcessor to be selectedFileHolder in Class X?
FileProcessor task = new FileProcessor(selectedFile, outerTextArea); task.execute(); selectedFileHolder = task.get();
@Override
protected void done() {
selectedFileHolder = get();
}
final FileProcessor task = new FileProcessor(selectedFile, outerTextArea);
task.addPropertyChangeListener(
new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (task.getState() == StateValue.DONE) {
selectedFileHolder = task.get();
}
}
}
);
task.execute();
Find content