Results 1 to 2 of 2
Thread: class loading
- 01-13-2009, 09:41 PM #1
Member
- Join Date
- Jan 2009
- Posts
- 2
- Rep Power
- 0
class loading
hi there,
i have two classes called login and members
what im tring to do is make when you press a button on the login form it shoes the members form.
im using action listener on the button, but im not sure of the code to use to call the members class. can someone point me in the right direction?
is it something like this:
Members objectName = new Members();
thanks
- 01-20-2009, 12:09 PM #2
Member
- Join Date
- Dec 2008
- Posts
- 99
- Rep Power
- 0
you meant shows? -what im tring to do is make when you press a button on the login form it shoes the members form
First, assume you have already class called allMembers . :
inside the actionListern
Java Code:// @Override public void actionPerformed(ActionEvent e) { // assume allMemebr is the list of the all members and // the method getAllNames return array of strings with all names Object[] memberNames = allMembers.getAllNames(); String s = (String)JOptionPane.showInputDialog( mainFrame, "Choose Member name", "title", JOptionPane.PLAIN_MESSAGE, null, memberNames, memberNames[0]); // s - will be the selected member name } // end of actionperformed
Similar Threads
-
Why is one applet loading but the other isn’t?
By spmchugh82 in forum Java AppletsReplies: 1Last Post: 01-26-2009, 03:39 PM -
Error loading c:\\...\jvm.dll
By dnyan123 in forum SWT / JFaceReplies: 7Last Post: 10-20-2008, 04:26 AM -
Factory loading class...help?
By prabhurangan in forum Advanced JavaReplies: 2Last Post: 10-14-2008, 02:20 PM -
Loading a class within a different class
By nick2price in forum New To JavaReplies: 1Last Post: 05-30-2008, 07:19 AM -
Help with class loading in java
By mathias in forum New To JavaReplies: 1Last Post: 07-31-2007, 08:51 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks