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

    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.


  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


    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, 04:08 AM
  2. two JFrames
    By kirtesh4u in forum New To Java
    Replies: 0
    Last Post: 11-17-2008, 08: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, 10:41 PM
  4. problem with getting new JFrames
    By geork in forum New To Java
    Replies: 0
    Last Post: 02-09-2008, 12:46 PM
  5. Handling Two JFrames
    By hiranya in forum AWT / Swing
    Replies: 2
    Last Post: 11-05-2007, 07: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