On Mar 20, 11:02 pm, zalek <zalekbl...@[EMAIL PROTECTED]
> wrote:
> Hello,
> I decided to write a simple application using Javabeans in NetBeans
> IDE 6.0.
> I created a frame with few buttons and fields.
> I gave a name to all fields and buttons. I switched from Design to
> Source and I see code like this:
>
> jButton1 = new javax.swing.JButton();
> ....
> jButton1.setName("b_exit");
>
> The above code cannot be changed.
>
> My questions:
> How I should I access object I created - I don't want to use name like
> jButton1 - I want to use name I assigned like b_exit.
> Is there any example of building simple application using JavaBeans?
> Which book do you recommend for learning Javabeans?
>
> Thanks,
>
> Zalek
Thanks for all replies - maybe I didn't explained clearly what was my
problem.
I am using IDE NetBeans to create a JFrame and Java program to use
this JFrame. The problem was that IDE Netbeams created names like
JButton1, JButton2 etc, while I wanted to use "human" names like
t_name or t_user. Using properties of the objects name was not
changed, only command .setName was used.
I found that mouse right click on an object changes object name - this
is what I wanted.
Thanks,
Zalek


|