Top.Mail.Ru
November 26th, 2004 - Java developers — LiveJournal
? ?

Java developers

November 26th, 2004

02:46 pm - jumperff - JEdits must accept only numbers and dot sign

There are two JEdits edPrice and edPriceTill. If first JEdit is empty then second must be editable=false. I tried like this
--------------------------
DocumentListener priceDocListener = new DocumentListener() {
public void changedUpdate(DocumentEvent e) {
doCheck();
}
public void removeUpdate(DocumentEvent e) {
doCheck();
}
public void insertUpdate(DocumentEvent e) {
doCheck();
}
private void doCheck() {
// HERE I NEED TO INSERT IT
// e.getChange(elem);
if(price.getText().length()<=0) {
priceTill.setEditable(false);
priceTill.setText("");
} else {
priceTill.setEditable(true);
}
}
};
--------------------------
Now I need to allow this edit to recieve only numbers and '.'. It seems to be done using
e.getChange(elem);
but it requires `elem` as parameter, where can i get it? Or am i wrong.
 

03:46 pm - martijnverburg - Development Environments

Hi all,

Do you find setting up development environments time-consuming, painful and difficult? Do you forget which little configuration change in your IDE you have to make? I have recently gone through the exercise of helping 10 or so new developers set-up their J2EE development environment. I have a few random thoughts on the process that may make your life easier, or not!

1.) Document it. And I don't just mean "Install XP, then Install Office, then install JDK, then install Eclipse". I mean document it _properly_ with screen shots if necessary. Make it so that the most junior of code monkeys can do the installs without your supervision.

2.) Test the process on sucker, oops! I mean person number one. I actually had our QA (computer literate, but not a Java developer) set-up a development environment to test the doc out. The doc got some needed improvements and she gained an appreciation of the complexity behind what we do, always a nice bonus!

3.) Plan on 2 working days for a reasonably complex J2EE environment. It takes me about a day to do the s/w installs and usually day two is spent on code/project configuration. Make sure your PM has this factored in!

I could say a lot more but then you'd fall asleep at your keyboards.. but feel free to comment away!

Cheers,
Martijn
Powered by LiveJournal.com