Hi Diancecht,
Thanks for the reply.
I did fear the performance issue.
However, as far as coding goes, I am already done with it and I have tested it as well. Seems to work really well.
Its a really basic utility. All it does is:
1. Look up the class, create a new instance of the class.
2...
Hello everybody!
I have never used reflection before is my first time even playing around with it.
I was thinking about a utility that will take a pojo as a parameter and them split a delimited line based on the fields defined in the pojo, create a new instance of the pojo and set the fields...
I am no guru at this stuff but the way I normally do is
public class MyBean {
private String fname = StringUtil.EMPTY;
public MyBean(String fname) {
this.fname = fname;
}
public String getFname() {
return fname;
}
public void setFname(String fname) {
this.fname = fname;
}
}...
RoadCond rc = rc.getUniqueQuery(); //
How can you use rc.getUniqueQuery() in the same line where you are initiallizing and assigning value to the object.
Basically rc is not initialized. Hence null pointer.
What you need is something like:
RoadCond rc = new RoadCond();
Object o =...
JButton myButton = new JButton(new ImageIcon("my image") );
Border noBorder = new LineBorder(Color.WHITE, 0);
myButton.setBorder(noBorder);
I think that should work.
In that case my next approach would be to use RandomAccessFile.
I would also try something like creating a new temp file for write and once you are done then delete the original file and rename the temp file.
PS: I am just throwing random ideas here. I have not really tried them.
When you say that you the values are lost when page reloads, what kind of page is it? Is it a JSP page? You need to give little more information. You can set attributes to save the list and use that to get the dynamic values entered.
The primary key should never be adjusted. If any record is...
I tried both the ways and I was able to cut 20 secs off the total processing by pulling up all the data beforehand than single query for each employee.
Thanks for all the inputs!
I would use third party libraries to play the MP3 file.
Check out the following link. They have a good example as well.
http://www.cs.princeton.edu/introcs/faq/mp3/mp3.html
Diancecht,
Unfortunately the type of work I am doing, I am not allowed to add any objects in the DB. That violates the contract.
So the only solution I have is through the java.
Hi all,
The program that I am working on requires that each employee's value be checked against a table.
The 2 different approaches that I have in mind are...
1) Pull up values for all the employees ahead of time and store in a HashMap. (about 12000 employees)
2) Query the DB each employee at...
I agree tom62 that GUI is the way to go. However, I want to follow the proper learning pattern and not skip any part. Yes sedj, it is part of my learning exercise.
I have actually moved on to GUI now. So far no major queries. But I am sure the Java gurus out here will be ready to help when I...
Hi all... This may sound novice but I am new to Java.. actually still learning.
I have the following lines of code to get an input
InputStreamReader reader = new InputStreamReader(System.in);
reader.read(charBuff);
However, I want to restrict the user input to only integer or float values...
OS: Windows XP Pro Service pack 2
This may sound stupid but yesterday I created admin user 'New' on my computer. All these days I was using the default 'Administrator' account. Today when I logged in, the 'Administrator' account was deleted. The files are still there. I only have 'New' account...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.