Nicolas Daudin

Greenhorn
+ Follow
since Dec 19, 2007
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 Nicolas Daudin

Originally posted by Balasubramanian Chandrasekaran:


What DocFlavour you are using to print.
Have you tried

DocFlavor.INPUT_STREAM.AUTOSENSE;.If not make you code to include



then check it.



I tried DocFlavor.INPUT_STREAM.AUTOSENSE, but my problem is that my special characters ('�' for example) are not taken into account...
16 years ago
OK i'm moving forward a bit but my config is not helping. I'm usually developing using my Mac but all the users are under PC.
So, seeing all my problems i decided to try this as well on PC. And with the same test code


I get with my PC:


And with my Mac:
16 years ago
As for me, i still didn't have found the solution...
Ryan, did you find something?
16 years ago
Hey
I'm still working on my problem, so as soon as i find an answer i'll let you know (as a matter of fact i havent had time yet to try what someone suggested me, i.e. put DocFlavor flavor=DocFlavor.INPUT_STREAM.AUTOSENSE)...
About your problem, do you have any log regarding your listners? do they print something?
16 years ago
Thanks for the answer. So for example if i put my call to the server inside, it will allow the user to do other actions meanwhile?
I won't work on this right now cause i have higher priorities on my application...
Nicolas
16 years ago
Hi,
I have a Swing app (with MVC pattern) with a Browser window that browses all my items of type Variantes, and a Variante edition form. Once i save the Variante (button Save in the edition form), i want to reload all my Variantes. But this takes quiet a lot of time. I would like to reload the variantes and update the GUI in a background task.

So far, here is my code for my save button



And BrowseVariantesAction.reloadBrowser is like this:

First we reload the data model, then we reload the view...
16 years ago
Hi,
My code doing the printing is the following:
16 years ago
Hi there
I have a little problem with my Swing application. I'm trying to print a String to my default printer using PrintService, and it does not work, either from my Mac or my PC.

On my Mac i get the following (and yet nothing is printed)


On my PC i get the following (same code, same default printer found):


As you can see, for the Mac, the printer is found, and it is even said that the job has been printed. BUT nothing is printed. Yet my printer works, i can print something from Word for example.
For the PC i don't understand why the flavor is wrong...

So thanks for any precious help!

Nico.
16 years ago
And how can i do this?
By a field.addKeyListener()...?
16 years ago
Hi there,
I have a JXTable that contains a column called "Delay".
Delay is a Label when it is not edited, and a JTextField upon edition.
I have a few lines in my JXTable.
When i click on my first Delay cell, i enter a value, then i press Enter and i get the focus on the next JTextField, and all the text is selected to be replaced (with this trick


Problem is, if i press the up arrow key or the down arrow key, the selected cell is the right one, but it is not in mode edition anymore (i.e. the JLabel appears, not the JTextEdit) and the focus is not on the field anymore but on the JXTable.
If i start inputing something, it adds to the value already present in the field: ex : if there was 24, i go on this cell from the previous one using Enter, i write 5, at the end i have 5. If i go on this cell from the previous one using the arrows, and i write 5, at the end i get 245. And i want the automatic selection as well for the Up and Down arrow keys cases.

Please help me
16 years ago
Hi there.

So i have a printing problem while using PrintService from Java.
Code compiles, traces say that printJob is completed and data transfer is done (i had put a listener on printDataTransferCompleted and he has been triggered)
And yet, nothing is printed out of my printer : this is the behavior when i launch my app from my Mac.
On my PC, with the same app, same printer, same configuration, it tells me "invalid flavor" (and yet it fouds the very same printer)

So i need your help :-)

Thanks a million

Nico
16 years ago
Hi i have a question about Hibernate

I have a service called StatisticService that has to handle entities of class Route.
I did a routeDao.loadAll() to get all the Routes from my base.
Then, i go to a POJO (i.e. no longer in any Hibernate session), and there, i do a myRoute.getPoint(). Route and Point are linked in the base, so are they in Hibernate. When i do this, thus i want to get the corresponding instance of Point. But problem is, i get a Point$$EnhancedByCGLIB$$ instance.

So here is my question:
if i am requesting on the entities in my DB, do i need to be in a service (i.e. in a hibernate session)??? I thought that getting my Routes through my DAO was enough to get all its dependencies and so to be disconnected from Hibernate.

PS: its just to do some read... i dont want to write on those instances...

Nicolas