Results 1 to 7 of 7

Thread: jframe

  1. #1
    Join Date
    Jan 2010
    Posts
    72
    Rep Power
    0

    Default jframe

    hi all...i want to display a JFrame on a JFame with the previous one disabled i.e. i want both the frames getting displayed with the back one not clickable until the operation on the second one is complete...
    is it possible...if yes then how...please tell me

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default

    Like a modal dialog over a JFrame?

  3. #3
    Join Date
    Jan 2010
    Posts
    72
    Rep Power
    0

    Default

    Quote Originally Posted by Norm View Post
    Like a modal dialog over a JFrame?
    previously i tried JInterFrame but it was not working out since the components on the JFrame were working...i want to open a window so that the JFrame is not clickable...
    more over the problem i was facing was something like this

    JInternalFrame a---> button1----> another JInternalFrame b---->button2--->a

    now clicking the button1 again which should show b but it results in an error

    is there any way to resolve this error if i go through JInternalFrame or is there any other way

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default

    What I am asking is: Do you want Frame1 to be like a frame that has opened a modal dialog? Ie Nothing can be done with Frame1 until the modal dialog is closed?

  5. #5
    Join Date
    Jan 2010
    Posts
    72
    Rep Power
    0

    Default

    Quote Originally Posted by Norm View Post
    What I am asking is: Do you want Frame1 to be like a frame that has opened a modal dialog? Ie Nothing can be done with Frame1 until the modal dialog is closed?
    yes sir.....

  6. #6
    curmudgeon is offline Senior Member
    Join Date
    May 2010
    Posts
    436
    Rep Power
    4

    Default

    So Norm's given you the answer: don't use a second JFrame but rather a JDialog that has its modal property set to true. Using a JDialog is similar to using a JFrame but there are some differences especially in constructor calls. Have a look at the JDialog API, and you'll see how to use it.

  7. #7
    Join Date
    Jan 2010
    Posts
    72
    Rep Power
    0

    Default

    Quote Originally Posted by curmudgeon View Post
    So Norm's given you the answer: don't use a second JFrame but rather a JDialog that has its modal property set to true. Using a JDialog is similar to using a JFrame but there are some differences especially in constructor calls. Have a look at the JDialog API, and you'll see how to use it.
    thanx sir.....

Similar Threads

  1. Replies: 5
    Last Post: 06-14-2010, 06:10 PM
  2. JFrame from a JFrame in project
    By anah in forum AWT / Swing
    Replies: 2
    Last Post: 04-19-2010, 06:20 PM
  3. Replies: 6
    Last Post: 04-12-2010, 11:33 AM
  4. Passing data from one JFrame to another JFrame
    By tarami in forum New To Java
    Replies: 3
    Last Post: 08-06-2009, 05:44 PM
  5. Replies: 4
    Last Post: 04-22-2009, 11:02 PM

Posting Permissions

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