Dror Guzman

Greenhorn
+ Follow
since Mar 07, 2005
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dror Guzman

>Now use the expression, milliseconds/week to get the number of weeks.
Same for month and year.

this holds true for days and weeks but not for months!! (or a leap year)

consider this:
Q: How many sec are there in one minute?
A: 60 - ALWAYS! (well...unless you are not on planet earth :-) )

How many weeks are there in one month?
Depends!!! - is it February or August (and Peter pointed out this correctly)

The bottom line is that there are no 4 weeks in a month and the calc offered to derived from the millisocnds will not help you in this case. you can use it for days and weeks (year also but check special cases where the year can be divided by 4 or 400 - leap year)
18 years ago
check the itext website
go to
http://itextdocs.lowagie.com/tutorial/objects/tables/

they have an example how to solve your problem.

Dror Guzman
18 years ago
you mean JScrollPane! not bar.

From the API:
setHorizontalScrollBarPolicy(int policy)
Determines when the horizontal scrollbar appears in the scrollpane.

So do this:
setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
18 years ago
Try this:

NumberFormat numberFormatter = NumberFormat.getCurrencyInstance();
Number result = numberFormatter.parse("$1,351.63");
18 years ago
Do this:

public void actionPerformed(ActionEvent e){

for(int i=0; i<MyButton.length; i++){
if(e.getSource() == MyButton[i])
// do your event here.....
}
}
18 years ago