Francois Nadeau

Ranch Hand
+ Follow
since Apr 09, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Francois Nadeau

Hello Arjun,

Arjun Shastry wrote:Is there any better way for doing this?



That really depends on your situation. If you are building a commercial program, or learning in order to make a commercial program, then I would sugggest that you use JavaHelp. It is very mature, and it gives you a interface that most Window$ users know how to use (since it will look just like Windows' help interface).

Arjun Shastry wrote:Contents are just 1 page or 2 pages long.


On the other hand, if this means that you only have 2 help pages, then using JTextPane seems like a good choise to display HTML in a Java application.

Hope this helps,


14 years ago
Hello Nipuna,

I assume that you already solved this, but I figure I can always respond anyway.

You did not provide the code where you use the DesignsAndCriteria class, but I am assuming that you it looks like this:



The problem with that is that initializeDesignsArray calls a synchronous function. Therefore, there are no guaranties that the designs variable is set when you call the getDesigns function.

There are many ways to solve this problem, one that comes to mind by looking at your code is the following:



and then change your code calling DesignsAndCriteria:


This will basically delay your initilization code until you have recieved the data from the synchronous call.

Hopes this helps,

Cheers.
14 years ago
GWT
Hello Hao,

I Googled around, and it looks like it can be done for excel with a third-party library. Check this for an example.

Cheers.
15 years ago
Hey,

What is the class name?
Hello Pallavi,

Not sure which entity bean container you are using, but if its hibernate your queries are case sensitive. Which means that your query needs a class named EMPLOYEE.
I am guessing you probably want:



Cheers
Hello Pierre,

Here is a link which shows how to map an array in Hibernate.

Sorry, I am not sure what you are trying to do with the types.

Cheers,

Francois
Hi Juan,

Yes, the code you show us would cause connection problems. You need to keep a reference to the session, and then close it. Calling getSession().close() will not close the session that you are using, but instead will close a new session which you did not use.

Your code should look as follows:



Cheers.

Francois
Hello Juan,

Have you verified that all hibernate sessions are closed (or at least disconnected) after being used?

Cheers,

Francois
I made two tutorials several years ago. It will show you how to get started quickly, but it does not provide much in-depth knowledge:

Tutorial 1 (Basic)
Tutorial 2 (Intermediate)

Hope this helps.
Hi Ramses,

If you are looking for a free opensource Java installer, you may want to check out IzPack http://izpack.org/. It worked fine for me, but commercial products tend to be easier to use.

Cheers.

15 years ago
Hello Adrian,

That looks like a fun problem.

I was wondering if you could set one of the server as master and the other as a slave. For example, updates are always done on ALPHA and then BETA. This would allow BETA to see the latest message, but clean-up the logic a great deal since you only need to worry about write calls in ALPHA (BETA would simply write what ever comes from ALPHA).

You posted this a few days back, did you already solve this problem?

Cheers.
15 years ago
Hi Ramses,

Not sure whether or not this will help you, but I did this last year with a Hypersonic database (HSQLDB). We had an application which supported Oracle, MySQL, and MS-SQL via Hibernate data access. So I simply added the Hypersonic jar file to the bundle, and then executed the db within the same VM. It worked great for our application (it actually runs faster since it does not need to travel the network). It also allowed us to sale a new spin-off (Personal Edition VS Server edition) of our application.

I would recommend the same to you if your application does not access a lot of data, and if your data access layer is decoupled from MySQL.

Cheers.
15 years ago
Hi Raminaa,

I can't remember all of the details, but we stopped setting the encoding setting on the connection url from MySQL version 4 (MySQL changed the connection mechanism form that version). Instead we set the database encoding to UTF-8 (there's a wizard from windows, Unix flavors will have to change the /etc/my.cnf file and restart the deamon), then create the tables (after changing the encoding), and then use jdbc:mysql://localhost:3306/test as a connection url.

Hope this helps.
Hello Carvel,

Drag and drop is a rather hairy and ugly beast in Java. However, before diving into it, why don't you place a JSplitPane between each of the sections? Or I suppose you can add a mouse drag listener to your divider component, and then change the components Y location based on where the mouse moves.

BTW, if you are creating this for a commercial product then I would suggest looking into SwingLab's JXTaskPanes (OpenSource). I have used this component before, and find it to be professional and easy to use.

You can see a web-start demo on this link: http://swinglabs.org/demos.jsp (SwingX Demo).

Cheers.
15 years ago
Hi Raja,

Just to be 100% sure, can you tell us what happens when you run

in the same window that you are executing your program?

Cheers.
15 years ago