This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Hi everyone. Some background on myself. Former AS/400 guy, recently downsized and unemployed. Taking this “opportunity” to learn java. I’m fairly new to Java and Netbeans. Since I’m unemployed and not in an organization with ‘experts’, I’m trying to find resources for help. I’m in ATLanta so I’ve joined www.ajug.org in hopes of networking with folks to find resources. I’ve also applied for some “Obama Bucks” in order to take some classes. Until then I was hoping someone could ask you “Good Folks” down on the javaranch for some help!
I’ve developed the security structure and a dynamic menu for a SWING application that uses MySQL. I’ve developed lots of SWING apps and compiled the classes that perform TABLE maintenance (Insert/Update/Delete) on the ‘static’ tables my application will use.
NOW, I’m getting into the ‘nitty-gritty’ of the application. I’m continuing to stumble over ‘pretty simple stuff’ that I believe a ‘SWING Application Architect’ or one of you Netbeans/SWING experts could readily answer.
Concerning Netbeans and Returning a value from a SWING class.
Netbeans creates two or more .java files in my projects.
Example: MyClass project contains MyClassApp.java and MyClassView.java
Normally, MyClassApp.java “launches” itself and then in startup() it does a show(new MyClassView(this)). I have several “look up” tables and want to create separate classes that allow the user to search through the table a return a row. (This is OOP, right!?)
So if I have an application ( MyApplicationApp and MyApplicationView) and I want to “call” MyClassApp…to search a database and return a key value to MyApplicationView…..
My "Menu Program" just does and execCMD() to run the Classes in my application.
For "CALLING MyClassApp from MyApplicationView" I believe I should use a constructor and create an instance of MyClassApp but what method do I use to “retrieve the key” from the class.
Can I just “Launch” the MyClassView? From MyClassApp
I read, “Using the Swing Application Framework(JSR296)” and I’m still not clear on how to do this…
I’m thinking that when MyClassApp completes the EXIT() it will cause a shutdown of the JVM (And kill MyApplicationView).
I could include the functionality in MyApplicationView but this program is already HUGE!
So I’ve a bunch of questions.
1) How do I accomplish this? (please)
2) Is this a limitation of “SingleFrameApplication”? (Trying to open another frame to return the value)
3) Do I have to put all the functionality in the MyApplicationView?
4) Or does the code that Netbeans generates just make this tough and there is a simple, elegant way to accomplish this
Thanking you in advance,
Current Java Newbie / Future Java CSD and Java Heavyweight,
I still don't understand everything I know- Yogi Berra