Results 1 to 4 of 4

Thread: How to pass object to jframe

  1. #1
    Join Date
    May 2008
    Posts
    222

    How to pass object to jframe

    I could not find a way to reach reference of my object in action Performed method. I want to do is when the user pushes the OK button i want the Frame/Dialog to return the new Object w/ all the options the user selected. a JFrame is your main window you disabled your Jmenu and have an option of Login button and the login button calls another JDialog Class.

  2. #2
    Join Date
    Jan 2009
    Posts
    163

    Re: How to pass object to jframe

    Now at the top of the document, before the DOCTYPE, within the php tags create two arrays * one for counties and the other one for "how did you hear about us", After you run your query, you can do something like this (I've left out the SQL code as it's our policy not to provide code unless the user has made an attempt and shows what they've done so far).

  3. #3
    Join Date
    Oct 2008
    Posts
    134

    Re: How to pass object to jframe

    all you need is an object with a reference to both frames or both tables. That object can live in either frame or neither frame. Create an Options class that holds all the options. Create a JFrame/JDialog child class that instanciates/initializes the Options class. But basically, you need to be notified of relevant events and a reference to both frames or tables so you can programmatically react to one and update the other.

  4. #4
    Join Date
    Oct 2008
    Posts
    127

    Re: How to pass object to jframe

    The problem is the Dialog never loads all the way do to the loop. It just becomes a gray box. If you in your MainFrame class want to refer an object then that objects scope must cover the method(s) where you want to reference the object. Any objects interested in the login status of the Adminstrator register themself at that object and change their state accordingly when they receive an event.

Similar Threads

  1. Replies: 6
    Last Post: 06-06-2011, 01:34 AM
  2. Replies: 3
    Last Post: 08-01-2011, 06:20 AM
  3. Replies: 9
    Last Post: 30-08-2010, 04:57 PM
  4. Pass JFrame to actionlistener
    By Freeza 2 in forum Software Development
    Replies: 5
    Last Post: 23-08-2010, 06:30 PM
  5. Replies: 4
    Last Post: 25-02-2009, 07:15 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,399,718.93787 seconds with 16 queries