Paul Clapham wrote:Actually... instead of having somebody try to explain networking to you in bits and pieces, you could try reading a book instead. Here's a good one for beginners: Networking For Dummies.
You may find tutorials online if you care to search but the field of networking is large enough that a book is a better source.
Paul Clapham wrote:
omar tawfeek wrote:thats great but how can i upload my application and its database on a server is there any tutorial out there teaching me how ?
You aren't going to do that. The server is a computer so you are just going to sign on to that computer (as an administrator, hopefully) and install the database.
And if you're going to write a desktop application, then there's not much point in having it on the server. It needs to be on the computers which belong to the people who are going to use it.
Again, none of this has anything to do with Java. It's just basic computer network management.
Paul Clapham wrote:The terminology is confusing you. A "server" can (and often does) mean a computer on which you run various applications whose purpose is to serve other applications. And it can (and often does) mean one of those applications.
For example a "web server" can be an application which responds to HTTP requests by sending back web pages as its response.
None of this has anything to do with Java, really, except that you could write a server application in Java if you liked.
And as for ".exe", yeah, you could do that in Java with some extra work but it's unnecessary and just provides another source of problems for you to stumble over.
Paul Clapham wrote:Your database is going to require a server, there's no getting around that. But there's no reason to be concerned, either. You can (and should) set it up so that it's only accessible within your local network -- this is the standard way to set up a database.
If you plan to write a desktop application for a sales system, well, that's sort of an unusual thing to do now. Desktop applications are very out of fashion. But they are still possible.
As for do you need Oracle SQL, no you don't. There are lots of SQL databases available, Oracle is just one of the possibilities.
Norm Radder wrote:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1
At line 30 the program used an index of 1 with an array that did not have at least 2 elements. Make sure the array is large enough and that the index value does not go past the end of the array.
Note: The test for the end of the looping in the for statement should use < not <=. The max index for an array is the length-1.
Also the btn array should be defined and given a length outside of the loop, not inside like is done on line 7. Line 7 changes the contents of btn every iteration of the loop. Anything put into the btn array following line 7 will be lost when a new btn array is created next time around on line 7.
Norm Radder wrote:
can you try the code
Yes, if you can make a small, complete program that compiles and executes and shows the problem. The code should not include any database or anything not related to the problem: adding multiple labels to a panel after the original window has been shown.
Norm Radder wrote:
it doesn't seem to work for me
What does "doesnt" mean? What happens when the code is executed?
How many buttons are shown?
Where is jPanel4 supposed to be shown? When is jPanel4 repainted to show the buttons that have been added to it?
Can you make a small, complete program that compiles and executes and shows the problem? It only needs to have jPanel4 and a container to hold it. No database or anything else. Only the bare minimum that shows the problem.
Stephan van Hulst wrote:Yes, this is possible, but it's really not recommended. Why would you couple a form so tightly to a button? Why don't you want to leave it up to client code to decide how the form is summoned? What makes you think this will affect performance in any way?