choubix alex

Greenhorn
+ Follow
since Dec 25, 2009
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 choubix alex

thanks for your input.
I still have to cover a lot of ground before I can develop a client that is "half correctly" baked ;)
14 years ago
Hi David,

For instance:

Software: Swing Client/Server/Database

User A is using the Swing Client, opens a Customer's file to update some info in the database (new email address and telephone number for instance)
User B opens the same Customer file to see info around the same time as he needs to call the customer and needs the phone number.

I believe User B will not see the changes in the Customer's profile unless he restarts his client? Am I right?

if so: is there a way to lock the document (Customer's file in that case) while User A is updating, let User B know that User A is working on this document, release the document when User A is done?
14 years ago
hello,

I am a bit intrigued by how java handles users and documents.
so I would have 2 questions:

Q1:
let's say that:
user A opens Document 1.
user B also open Document 1.

-> isn't there any conflict here ?

(for instance, the changes made by user A would be "erased" by user B without user B being able to see the modifications made by user A)

Q2:
also:
if user A creates document and saves it, does user B have to close and reopen his java client to see the document created by user A?

thanks!
14 years ago
Hello and thanks for your reply. I was posting here as I am a beginner.

I was thinking about :

H2 database
OpenJPA
Jetty / Tomcat webserver
and a Swing client

but since I am new to Java I would need some guidance (or some good references/books that I can buy to study)





14 years ago
Hello!

I'd like to start coding next week but I am struggling with the architecture...

Does anyone knows of a good book (or any other good resource) that would allow me to build up the skills/understanding necessary to code a 'basic' client/server application?

I'd really like to be able to have a remotely accessible application with a front end using either a browser or swing and connecting to a server where the H2 database will be installed (connection through internet & intranet since we'll be using laptop when traveling and desktop in the office).

I suppose it is quite an ambitious project but I am confident I'll be up to the tasks

Thanks!


14 years ago
Thanks again!

I've stumble on MiG shortly after posting my message and I have managed to position my labels in a much better way.
I was tempted to use a Visual builder (netbeans provides one I think) but I have decided to start coding my UI instead so that I can learn better/more.

14 years ago
hello,

I am learning the basics of Swing / Substance look and feel.
I'd like to add some icons to my Jbuttons. (load, save, delete...)

I came across the graphic library (from java.sun.com). it comes a Jar file that contains gif files.
I've built a class path for the Jar and it is now in the "reference library" folder.

but when I try to do "import thenameofmyjar.*;" where my code is it returns an error.

basically: I know how to import the jar in my project as a reference but I don't know how to make use of it

can someone tell me how to do please?

by the way: if I download a pack of gif from the web for my interface. how would I link these gif files to my project? (do I need to create a jar file for them? if so: is there a tutorial for that? do I need to put them in a folder and reference them manually?)

thanks!
14 years ago
Hi!

I am creating a login screen to get up to speed with Swing.
When I run the following code all the elements are displayed BUT their position on the screen is not correct.
is it possible to display the elements like this

username: (textfield here)
password: (passwordfield here)
comment: (comment field here)

etcetc

while aligning them so it looks nice? (all the labels / fields aligned)

thank you for your time

ps: please feel free to comment my code on my code as this is new for me and that I would like to progress fast


code:

14 years ago
Thank you Maneesh,

it works now!
14 years ago
hello everybody

I've just joined the bandwagon and I am learning java
Not having a strong IT background I've read 2 books so far
I am quite thrilled at the idea of developing my first UI.


I stumble on Substance which looks very cool and I'd like to use it.
however I dont really understand how to make it work in Eclipse. (the instructions on the website are for more "advanced" developers )

has anyone tried to setup substance in Eclipse before and can help me with it please?

thanks!
14 years ago
well, right now I am at the "embryonic stage" hahaha ;)

but you are right: I've read that the use of Setters/Getters is not fully "OO" compliant. Nevertheless I am really trying to get things to work at the moment.

next on my list is to :
- have a clear roadmap of what I want to develop in terms of functionalities and look/feel (java, swing + webstart / JavaFX)
- get hold of JDBC

Then I will certainly have to design an "infrastructure" for what I want to achieve and finally work on the performance and scalability of the application
(I suppose that means using: Maven 2, Subversion, Hudson, Jira -as hopefully I'll get someone on board late next year and that implementing all these tools would help working with someone else!)

And I am not mentioning the various packages that I will undoubtedly stumble upon when looking for reporting capabilities, charting etcetc...









14 years ago
hello,

I've understood how to display decimals and change strings to upper/lower case (so many online resources on Java!)

I was wondering what should be best in the following code where I convert a string to:
1st character: upper string, subsequent characters, lower case. (line 25, first block of code)

the code is quite lengthy...

instead of calling "myaccount.GetAnyVariableNameHere" in the out.println(), shall I create a variable and call it ?
if so: should the name be the same as in the setter/getter or different?

thanks!




and


14 years ago
Hi!


Fred, Joe, Mark, Marco: thank you so much for spending of your time writing detailed answers.
I don't know yet if I'll be using multithreading (beginner with only 3 days of Java under my belt! ;) )
maybe it will be useful for what I intend to do but I have not yet reached that stage hehehe ;)

I dont foresen the company hiring programmers in the short term but I understand your point with the setters/getters.
Controlling the data stored in the variables is crucial (it can be quite messy if the code is not explicit! it's already quite difficult after a few days away from the office and when the code is not commented properly...) and can prevent users from storing something that shouldnt be there.
14 years ago
hi there,

I've come to the point where, in the 2 books I am using right now, the authors are mentioning the getters and setters as a way to "enforce" control over the variables. It doesnt quite make sense to me... the couple of examples I foudn online do not make much sense either...

can someone shed some light on this for me please?

basically: why would I NOT want to interact directly with the variables I have created in a class? it seesm more "natural" to me to use them directly...

and : is the use of constructors and getters/setters mutually exclusive? (it seems quite difficult to me to combine both at the same time even though the purpose is different)

thanks!
14 years ago
I think I have partially cornered the problem: I was a bit blur on how to use a 2D array properly in java.

for instance:

int[][] multiDollar = new int[1][dollarEarned2.length];

would mean that multiDollar has 2 rows and 3 columns (because dollarEarned2.length = 3).
and each row represents an array and each column represents the position within the array.


Still I have a problem understanding how to store correctly dollarEarned[] and DollarEarned2[] in multiDollar[][]
I've been trying using 2 "for" loops but with no success.

basically I am trying to get this (using loops to store):

multiDollar[0][0] = 100
multiDollar[0][1] = 200
multiDollar[0][2] = 350
multiDollar[1][0] = 2000
multiDollar[1][1] = 4000
multiDollar[1][2] = 5500


have someone a chunk of code lying around that would show how to store 2 arrays in a 2D array using doulbe nested loops please?
thanks!


14 years ago