Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > Newbie - basic questions about Javabeans
User Name
Password
REGISTER NOW! Mark Forums Read




Reply Bookmark and Share
1 20th November 22:37
zalek
External User
 
Posts: 1
Default Newbie - basic questions about Javabeans



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
  Reply With Quote


 


2 20th November 22:38
zalek
External User
 
Posts: 1
Default Newbie - basic questions about Javabeans



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
  Reply With Quote


 


3 20th November 22:38
mark space
External User
 
Posts: 1
Default Newbie - basic questions about Javabeans


You pretty much have to use jButton1. You can change that name too.
Right click on the component and select "Change variable name".

This is Swing, not Javabeans. Try to learn Swing. I recommend
_Learning Java_ by O'Reilly, it's a good introduction to Java, including
Swing. Once you get a handle on that, Sun's Tutorial becomes easier to
read and understand.
  Reply With Quote
4 20th November 22:38
mark space
External User
 
Posts: 1
Default Newbie - basic questions about Javabeans


You pretty much have to use jButton1. You can change that name too.
Right click on the component and select "Change variable name".

This is Swing, not Javabeans. Try to learn Swing. I recommend
_Learning Java_ by O'Reilly, it's a good introduction to Java, including
Swing. Once you get a handle on that, Sun's Tutorial becomes easier to
read and understand.
  Reply With Quote
5 20th November 22:38
zalek
External User
 
Posts: 1
Default Newbie - basic questions about Javabeans


Mark,

My question was related to Javabeans IDE. In this IDE you build GUI
similar way as in VB or Powerbuilder - you do not use explicitly any
layout manager - IDE is doing this work for you. I created GUI, it is
displayed - my question was how to programaticly change contents of
this GUI.

Zalek
  Reply With Quote
6 20th November 22:38
zalek
External User
 
Posts: 1
Default Newbie - basic questions about Javabeans


Mark,

My question was related to Javabeans IDE. In this IDE you build GUI
similar way as in VB or Powerbuilder - you do not use explicitly any
layout manager - IDE is doing this work for you. I created GUI, it is
displayed - my question was how to programaticly change contents of
this GUI.

Zalek
  Reply With Quote
7 20th November 22:38
ck
External User
 
Posts: 1
Default Newbie - basic questions about Javabeans


Arent you talking about NetBeans? --
Claus Dragon <clauskick@mpsahotmail.com>
=(UDIC)=
d++ e++ T--
K1!2!3!456!7!S a29
"Coffee is a mocker. So, I am going to mock."

- Me, lately.
  Reply With Quote
8 20th November 22:38
ck
External User
 
Posts: 1
Default Newbie - basic questions about Javabeans


Arent you talking about NetBeans? --
Claus Dragon <clauskick@mpsahotmail.com>
=(UDIC)=
d++ e++ T--
K1!2!3!456!7!S a29
"Coffee is a mocker. So, I am going to mock."

- Me, lately.
  Reply With Quote
9 20th November 22:38
mark space
External User
 
Posts: 1
Default Newbie - basic questions about Javabeans


No, you said "NetBeans". I use NetBeans 6.0.1 and I'm familiar with
Matisse, the GUI builder.

JavaBeans is different from NetBeans. JavaBeans is a spec. NetBeans is
an IDE. Very different.
  Reply With Quote
10 20th November 22:38
mark space
External User
 
Posts: 1
Default Newbie - basic questions about Javabeans


No, you said "NetBeans". I use NetBeans 6.0.1 and I'm familiar with
Matisse, the GUI builder.

JavaBeans is different from NetBeans. JavaBeans is a spec. NetBeans is
an IDE. Very different.
  Reply With Quote
Reply


Thread Tools
Display Modes


Some other forums that might be of your interest : Development, Ada, Apple script, Assembler, Awk, Beos, Basic, C, C++, C#, C# .net, .net, .net frameworks, Asp .net, Clarion, Clipper, Clos, Clu, Cobol, Coldfusion, Delphi, Dylan, Eiffel, Forth, Fortran, Haskell, Hermes, Icon, Idl, Java, Java script, Jscript .net, Jcl, Linoleum, Lisp, Lotus, Limbo, Logo, Ml, Mumps, Oberon, Postscript, Pop, Pl1, Prolog, Python, Ruby, Pascal, Perl, Php, Rebol, Rexx, Sed, Sather, Scheme, Smalltalk, Tcl, Vhdl, Vrml, Visual basic, Visual basic .net, Yorick, Mysql, Omnis, Postgresql, Xbase, Access, Oracle, Adabas, Berkeley, Btrieve, Filemaker, Gupta, Db2, Informix, Ingres, Mssql server, Object, Olap, Paradox, Rdb, Revelation, Sybase, Theory, Dbase, Html, Java script, Css, Flash, Photoshop, Corel script, Xml, Tech, Beos, Gem, Hp48, Hpux, Linux, Mac, Ms-dos, Os2, Palm, Solaris, Ti99, Windows, Xenix, Aos, Chorus, Geos, Inferno, Lantastic, Lynx, Mach, Minix, Netware, Os9, Parix, Plan9, Psos, Qnx, Xinu, Sco, Unix, Aix, Aux, 386bsd, Bsdi, Freebsd, Netbsd, Openbsd, Ultrix, Amd, Intel, Aptiva, Buz, Deals, Homebuilt, Overclocking, Programming, Extra forums


Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666