Results 1 to 2 of 2
  1. #1
    Robert is offline Member
    Join Date
    Jan 2009
    Posts
    1
    Rep Power
    0

    Default problem with jframes

    Hi every body.

    I got a problem. I have been trying to work with 2 JFrames, JFrame2 enable(false), and JFrame1 with a button. What i want to do is to notify JFrame2 when an envent occurs in JFrame1, and then enable it. I hope somebody can help me.

    Thx.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    I would use listeners here such as a ChangeListener or even pass an ActionListener from one class to the other.

    But before doing that, think whether you truly want two JFrames here. Most Swing apps have only one JFrame, the main frame, and then if other windows are needed they use dialogs such as a JDialog.

Similar Threads

  1. [SOLVED] how to hide jframes
    By yonghan in forum AWT / Swing
    Replies: 6
    Last Post: 08-10-2009, 05:08 AM
  2. two JFrames
    By kirtesh4u in forum New To Java
    Replies: 0
    Last Post: 11-17-2008, 09:26 PM
  3. Adding JPanels to JFrames based on x-y co-ordinates
    By aneesahamedaa in forum AWT / Swing
    Replies: 4
    Last Post: 07-24-2008, 11:41 PM
  4. problem with getting new JFrames
    By geork in forum New To Java
    Replies: 0
    Last Post: 02-09-2008, 01:46 PM
  5. Handling Two JFrames
    By hiranya in forum AWT / Swing
    Replies: 2
    Last Post: 11-05-2007, 08:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •