Fabio Lucci

Greenhorn
+ Follow
since Dec 01, 2005
Merit badge: grant badges
For More
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 Fabio Lucci

HI, I use this method to print my JTable with header (Title) and footer (page number):

public static void PrintTable(JTable mytable, String titletable) {

try {
// fetch the printable
Printable printable = mytable.getPrintable(JTable.PrintMode.FIT_WIDTH,
new MessageFormat(titletable),
new MessageFormat("Page - {0}"));

// fetch a PrinterJob
PrinterJob job = PrinterJob.getPrinterJob();

// set the Printable on the PrinterJob
job.setPrintable(printable);

// create an attribute set to store attributes from the print dialog
PrintRequestAttributeSet attr = new HashPrintRequestAttributeSet();

// display a print dialog and record whether or not the user cancels it
boolean printAccepted = job.printDialog(attr);

// if the user didn't cancel the dialog
if (printAccepted) {
// do the printing (may need to handle PrinterException)
job.print(attr);
}
}
catch(Exception gh){

}
finally {
// restore the original table state here (for example, restore selection)
}

}



it's all ok ... I want change the font size to the TITLE (HEADER) because now print a title with big font size.

Is it possible to do it?

thanks a lot
17 years ago
hi, i have a java application and I have import some data from a csv file.
These data update some field in a Access DB.
For update the db I use:

s.executeUpdate("UPDATE TableOrders SET WEEK = "+nweek+" WHERE Order = '"+norder+"'");

My problem is: if I run my application on my computer (P4 - 1gb RAM - OS windows xp) and I import the file ... only 5 seconds and all data are in db if I use another computer (for example my notebook M 512 Mb RAM - OS windows xp) the importation is very very slow (1 hour).

I think the problem is "UPDATE" because if I cancel the line with UPDATE the program don't have any ploblems.

I don't understand because the DB is the same and the OS yet.

Thanks for help
[ December 01, 2005: Message edited by: Bear Bibeault ]