This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes How to add component(like Button, Text Feild) from other class to the Menu Bar in other class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to add component(like Button, Text Feild) from other class to the Menu Bar in other class" Watch "How to add component(like Button, Text Feild) from other class to the Menu Bar in other class" New topic
Author

How to add component(like Button, Text Feild) from other class to the Menu Bar in other class

Gursewak Singh
Ranch Hand

Joined: Jan 09, 2011
Posts: 79

Hi All,

Greetings!
I have a class (Main Class), where I have menu Bar.
I want also have one other class (Say AddRecod), I want to add component of AddRecod class to the Menu Bar of main class.

Please fine the code given blow:

Main Class:



AddRecord Class:


Thanks in Advance,

Best Regards
Gursewak Singh.
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4167
    
  21

Hi Gursewak,

I moved your post to the Java in General forum, since it is specifically about Java (and not general computing).

A couple other house-keeping notes: first, it would help your code readability if you used code tags, please see UseCodeTags. For this post, I added them for you since we are past the point where you can edit your post, but in the future please add them yourself.

And finally, I don't actually see a question. What problem are you having?


Steve
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to add component(like Button, Text Feild) from other class to the Menu Bar in other class
 
Similar Threads
Problem with ActionListener and JButtons (harder than it first seems
how to set this a borderq
problem in textfield width...
can you help me with this code?
not showing JLabel and TextField