Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Swing JFrame

 
sufi thangadurai
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have one parent JFrame in that I have two buttons, IF i click the first button I want to open one jInternalframe . in the opened jinternalframe I have one close button. if i press the close button, the internal frame should be closed, not the parent frame.please anybody can help me by writing 15 lines of code?
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there and welcome to Javaranch!

Firstly a quick admin matter, this looks like a Swing problem so I'll move it over to that Forum. Also please note that Javaranch is NotACodeMill.

Can you post the actual code that you have so far? We can then help you resolve this problem
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume that you've gone through the Sun tutorial on how to use internal frames? If so, it should have laid it all out for you. A better question here then may be "what specifically in the tutorial did you not understand?" I also second the recommendation above that you post your current code and explain how it's not working.

If you do post your code, you will do well to make it compilable, and simple as possible. I recommend that you use simple layouts here and avoid using NetBeans generated layouts as not all of us can compile these and they are large, bulky, and ugly as sin. Good luck.
[ October 22, 2008: Message edited by: pete stein ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic