• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 142
  • Last Modified:

Java Window Frames

Dear Sirs,
I have 2 windows frames. Let's put it this way: a parent and a child.
How can I prevent access to the parent frame when the child is active (called from the parent). In other words, open it in read mode.

Another scenario, is that to only keep the child active and close the parent.

I am new to Java.
0
Omer-Pitou
Asked:
Omer-Pitou
  • 3
  • 2
1 Solution
 
CEHJCommented:
Generally speaking, you should only have one JFrame class per app. Additional windows will be some kind of dialog. If you use a JOptionPane for this, it is by definition modal and the functionality will be as you desire. If you want to use a JDialog subclass, call setModal(true)
0
 
Omer-PitouAuthor Commented:
Thanks. Can I put button, textfield... On a JDIalog?
0
 
CEHJCommented:
Yes. Use a JDialog much like a JFrame
0
 
Omer-PitouAuthor Commented:
Thanks very much for your time
0
 
CEHJCommented:
:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now