Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Report of Daffodi DB

  Asked By: Oscar    Date: Oct 09    Category: Java    Views: 588

Can someone give me report of Daffodi DB (www.daffodilwoods.com). I
am in urgent need of this. If anyone of has used, tested or bought it
please tell me how good it is.



5 Answers Found

Answer #1    Answered By: Leon Evans     Answered On: Oct 09

I am trying to put a link in HTML web page with frontpage2000 for a
Pocket PC 2002 PDA to dail a phone number on a phone version PDA! so
when you click the link it auto dails the number, does anyone know
how to do it or is it not even possible! Anyhelp would be very much

Answer #2    Answered By: Garai Chalthoum     Answered On: Oct 09

written a class which reads a .properties file and the
class should be a singleton. i dont know how to check the wether the
class is a singleton or not, can any one check the file and let me
know wether the written class is a signleton or not.
I appreciate ur Help.

Here the java file is, followed by .properties file

import java.io.FileInputStream;
import java.util.Properties;
import java.util.*;

public class PropertiesTest {

private PropertiesTest() {}

private static PropertiesTest MySingleTon = null;

public static PropertiesTest getInstance()
if ( MySingleTon == null ) {
MySingleTon = new PropertiesTest();
return MySingleTon;

FileInputStream propFile = new FileInputStream
Properties p = new Properties();

Enumeration keys = p.propertyNames();

while (keys.hasMoreElements())

String key = (String)keys.nextElement();
String value = p.getProperty(key);
System.out.println( " the property value of " + key + " and
value is " + value);
}//end of while
}catch(Exception e){e.getMessage();}


Answer #3    Answered By: Caitlin Brown     Answered On: Oct 09

Your singleton is not thread safe...

either you need to synchronize the getInstance method or maybe you should
initialize it in the declaration of the MySingleTon variable instead?

Also you dont have to use static when using a singleton (after all the
MySingleTon var is already static) do all your initialization in
the constructor of the singleton instead. This is the template i use (may
contain typoes since i just need to sleep instead of compiling but since
sleeping is boring, im here typing this message... oh well):

class Singleton {
private static Singleton _inst = new Singleton();
public Singleton getInstance() {
return _inst;

// Other props
private int aValue;
private String anotherOne;

// constructor - initializes
private Singleton() {
aValue = 5;
anotherOne = "five";
// etc

public synchronized void setAValue(int val) {
aValue = val;
public int getAValue() {
return aValue;

Note that the only member being static is the instance of the Singleton,
everything else should not be. If you have methods (e,g, setters) for
updating data in the singleton you MUST synchronize them or you may have

My singleton can be tested like this:

Singleton s1 = Singleton.getInstance();
/* now lets drop s1 and get a completely new instance... um or is it? ;) */
Singleton s2 = Singleton.getInstance();
System.out.println( s2.getAValue() );
// and we should get a nice 7, not a 5 or anything else

I'd also like to raise a warning here. Singletons are not always a good
solution to your problems, in an EJB environment they may cause more harm
than help since a singleton is specific to it's classloader by default and
EJB uses several classloaders even several machines thus making strange
things happening to some singletons.

For your property loader class you could also check out
java.util.ResourceBundle especially if you want to work with multi language

Answer #4    Answered By: Mamie Wallace     Answered On: Oct 09

Here are my errors....................................................

Exception in thread "main" java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:625)
at java.awt.Container.add(Container.java:307)
at Checkerboard.<init>(Checkerboard.java:31)
at Checkerboard.main(Checkerboard.java:95)

Can any1 help me understand what is wrong with this code ?
Here is the Code......................................................

import java.awt.*;
import java.awt.event.*;
import java.io.*;

public class Checkerboard extends Frame implements ActionListener
TextField checkerArray[];
Panel mainPad = new Panel();
Panel checkerRows = new Panel();
Panel fieldRow = new Panel();
TextField firstText = new TextField(5);
TextField scndText = new TextField(5);
TextField thirdText = new TextField(5);
int start, stop, step;
String temp;

public Checkerboard()
BufferedReader dataIn = new BufferedReader(new
checkerArray = new TextField[16];
Button Clear = new Button("Clear");
Button Go = new Button("Go");
start = 0;
stop = 0;
step = 0;

setLayout(new BorderLayout());

checkerRows.setLayout(new GridLayout(4,4));
for(int f=0; f<checkerArray.length; f++)

fieldRow.setLayout(new GridLayout(2,3));
fieldRow.add(firstText, BorderLayout.SOUTH);
fieldRow.add(scndText, BorderLayout.SOUTH);
fieldRow.add(thirdText, BorderLayout.SOUTH);


new WindowAdapter()
public void windowClosing(WindowEvent
public void init()
for(int i = 0; i<=16; i++)

for(int f = 0; f < checkerArray.length; f++)

for(int i = 0; i < checkerArray.length; i++)


public void actionPerformed(ActionEvent e)
String arg = e.getActionCommand();
if(arg == "Go")
temp = firstText.getText();
start = Integer.parseInt(temp);
temp = scndText.getText();
stop = Integer.parseInt(temp);
temp = thirdText.getText();
step = Integer.parseInt(temp);

if(arg == "Clear")


public static void main(String args[])
Checkerboard checkerFrame = new Checkerboard();

checkerFrame.setTitle("Checker Board");

Answer #5    Answered By: Randy Warren     Answered On: Oct 09

Try making the for loop as follows, otherwise, initialize the individual
elements of the checkerArray before sending in to the checkerRows. The
problem is you initialize the array. that is fine. But, you havenot
initialized the individual objects (for eg., checkerArray[0]) which you pass
in as parameter.

for(int f=0; f<checkerArray.length; f++)
checkerArray[f] = new TextField();

Didn't find what you were looking for? Find more on Report of Daffodi DB Or get search suggestion and latest updates.